teo-sprint12-Day 4~final
π¨ νλ‘μ νΈ μΌμ§
μ 보 μ λ¬λ³΄λ¨ νλ‘μ νΈλ₯Ό μ§ννλ©° κ²ͺμ μ λ€, λλ μ λ€μ κΈ°λ‘ν μΌμ§
Project
: ν
μ€μ μ€νλ¦°νΈ 12κΈ°
νλ‘ νΈμλ κ°λ°μλ‘ κ΅¬κΈλ§νλ€λ³΄λ©΄ λꡬλ νλ²μ―€μ λ€μ΄κ°λ³΄μμ ν
μ€μ λΈλ‘κ·Έ
μ΄λ² νλ‘μ νΈλ ν
μ€κ° μ΄μνλ ν
μ€μ μ€νλ¦°νΈ 12κΈ°
μ μ°Έμ¬ν κΈ°λ‘μ΄λ€.
짧λ€λ©΄ 짧μ 5μΌμ κΈ°κ° λμ μ²μ 보λ μ¬λλ€κ³Ό νμ μ΄λ€, νμ
(ν
μ€κ° μ μΌ κ°μ‘°νλ λΆλΆ)
μ λ°°μΈ μ μλ μ’μ κΈ°νλΌκ³ μκ°νλ€!
π κ°λ°μ μμ
ν μ€κ° 4μΌμ°¨μ 보λ΄μ£Όμ λ©μΌμ λ무 μ’μ λ΄μ©λ€μ΄ λ§μμ κΈ°λ‘ν΄λλ€.
- μΉ μλΉμ€μ μμ±μ μλ€. μΈμ λ λ―Έμμ±μΈ μνλ‘ μ λ°μ΄νΈλ₯Ό ν μ μλ ννλ₯Ό μ·¨νκ² λλ€.
- ν°μ μ λ°λͺ¨ μ¬μ΄νΈλ₯Ό λ¨Όμ μ€ννκ³ κ·Έλ΄λ―νκ² λμκ°λ Tour(Demo)λ₯Ό λ§λ€μ΄, μ€μ μλΉμ€λ₯Ό 릴리μ¦νκ³ κ³ λννλ κ³Όμ μ κ²ͺκ² λλ€.
μλμ°¨λ₯Ό λ§λ λ€κ³ ν λ, λΆν νλνλλ₯Ό μΆκ°νλ©΄μ μμ§ κ΅΄λ¬κ°μ§ λͺ»νλ μνκ° μλλΌ λ¨Όμ κ΅΄λ¬κ°λ 보λλ₯Ό λ§λ€κ³ μμ κ±°κ° λκ³ μλμ°¨κ° λλ―!!!!!
μμμ νμ νκ³ λ―ΈλΉν μ μμ§λ§, μΌλ¨ κ·Έ κΈ°λ₯μ΄ λμκ°κ²λ νλ κ²! κ·Έλ¬λ©΄ μ κ°λμ§ ν
μ€νΈλ ν΄λ³Ό μ μκ³ , μ΄λ€ λμμΈμ μ
νλ κ² μμμ§ μκ°λ ν΄λ³Ό μ μμν
λ!
κ°λ° μμ
μνμΉ΄μ ν¨κ» 첫 νλ©΄μ 맑μλ€.
μμ κ°μ νλ©΄μ λ§λ€κ³ , μμ 5κ° λ²νΌμ ν΄λ¦ μ ν΄λΉνλ 컨μ
μ λ μ¨ μ 보 λ°°μΉ λ°μ΄ν°κ° λ€μ νμ΄μ§λ‘ μ λ¬λμ΄μΌνλ€.
λν, λ§μ§λ§ 6λ²μ§Έ λ²νΌμ ν΄λ¦ μ μ μ κ° μ§μ λ μ¨ μ 보λ₯Ό λ°°μΉνκ³ μ‘°μ ν μ μλ 컀μ€ν
νμ΄μ§λ‘ μ΄λνλ€.
κ°κ°μ μ νμ§λ₯Ό ν΄λ¦νλ©΄ λ‘컬μ€ν 리μ§μ²λΌ 리μ½μΌμ ν΅ν΄ μ μμΌλ‘ λ°μ΄ν° μμμ λν μ λ³΄κ° λ΄κΈ°κ²λ λ‘μ§μ μ§°λ€.
import { atom } from 'recoil';
import { recoilPersist } from 'recoil-persist';
const { persistAtom } = recoilPersist();
export interface StartData {
sort: string;
category: string;
title: string;
size: string;
color: string;
}
export const startState = atom<StartData[]>({
key: 'startState',
default: [],
effects_UNSTABLE: [persistAtom],
});
import React from 'react';
import styled from 'styled-components';
interface Props {
title: string;
icon: string;
color: string;
}
// μ νμ§ μ»΄ν¬λνΈ
const StartSelectBox: React.FC<Props> = ({ title, icon, color }) => {
return (
<Wrapper color={color}>
<Icon>{icon}</Icon>
<Title>{title}</Title>
</Wrapper>
);
};
interface ColorProps {
color: string;
}
const Wrapper = styled.div<ColorProps>`
display: flex;
border: solid ${(props) => props.color} 2px;
justify-content: center;
align-items: center;
height: 5rem;
width: 100%;
margin-bottom: 2rem;
border-radius: 30px;
cursor: pointer;
@media screen and (max-width: 32rem) {
height: 3rem;
}
`;
const Icon = styled.div`
font-size: 2.5rem;
margin-right: 1rem;
@media screen and (max-width: 32rem) {
font-size: 1.5rem;
}
`;
const Title = styled.span`
font-size: 1.5rem;
font-weight: bold;
@media screen and (max-width: 32rem) {
font-size: 1rem;
}
`;
export default StartSelectBox;
import React from 'react';
import { useNavigate } from 'react-router-dom';
import { useRecoilState } from 'recoil';
import styled from 'styled-components';
import StartSelectBox from '../../component/start/startSelectBox';
import { startState } from '../../store/state/startData';
import theme from '../../styles/theme';
interface Props {
title: string;
icon: string;
color: string;
onClick: () => void;
}
const Start = () => {
const colorChip = ['#FF7A7A', '#B470EA', '#FFC42E', '#61C3A0', '#929292'];
const [startData, setStartData] = useRecoilState(startState);
const presetData = {
presets: [
{ id: '1', title: 'λΉκ° μ€λμ§ κΆκΈν΄μ', icon: 'β', color: '#609FFF' },
{
id: '2',
title: 'λ¬λ¦΄λ§ν λ μ¨μΈμ§ κΆκΈν΄μ',
icon: 'π',
color: '#FF7A7A',
},
{
id: '3',
title: 'νλ μνκ° κΆκΈν΄μ',
icon: 'π€οΈ',
color: '#B470EA',
},
{
id: '4',
title: 'κΏκΏνμ§ μμμ§ κΆκΈν΄μ',
icon: 'π«οΈ',
color: '#FFC42E',
},
{ id: '5', title: 'μ무λ κ²λ ν΄μ£ΌμΈμ', icon: 'ποΈ', color: '#61C3A0' },
],
selfCustom: [{ title: 'μ κ° μ»€μ€ν
ν λμ', icon: 'π', color: '#929292' }],
};
const initialData = [
[
{
sort: 'λΉ',
category: 'POP',
title: 'κ°μνλ₯ ',
size: '2',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λΉ',
category: 'PCP',
title: '1μκ° κ°μλ',
size: '2',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λΉ',
category: 'PTY',
title: 'κ°μνν',
size: '2',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λκΈ°',
category: 'SKY',
title: 'νλμν',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λκΈ°',
category: 'TMP',
title: '1μκ° κΈ°μ¨',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λ°λ',
category: 'VEC',
title: 'νν₯',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λ°λ',
category: 'WSD',
title: 'νμ',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
],
[
{
sort: 'λΉ',
category: 'POP',
title: 'κ°μνλ₯ ',
size: '2',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λκΈ°',
category: 'TMP',
title: '1μκ° κΈ°μ¨',
size: '2',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λ°λ',
category: 'WSD',
title: 'νμ',
size: '2',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λκΈ°',
category: 'SKY',
title: 'νλμν',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λκΈ°',
category: 'REH',
title: 'μ΅λ',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λ°λ',
category: 'VEC',
title: 'νν₯',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'κ°μ',
category: 'SNO',
title: '1μκ° μ μ μ€',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
],
[
{
sort: 'λκΈ°',
category: 'SKY',
title: 'νλμν',
size: '2',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λκΈ°',
category: 'TMP',
title: '1μκ° κΈ°μ¨',
size: '2',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λΉ',
category: 'PCP',
title: '1μκ° κ°μλ',
size: '2',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λ°λ',
category: 'VEC',
title: 'νν₯',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λ°λ',
category: 'WSD',
title: 'νμ',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λκΈ°',
category: 'REH',
title: 'μ΅λ',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λΉ',
category: 'POP',
title: 'κ°μνλ₯ ',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
],
[
{
sort: 'λκΈ°',
category: 'REH',
title: 'μ΅λ',
size: '2',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λΉ',
category: 'POP',
title: 'κ°μνλ₯ ',
size: '2',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λκΈ°',
category: 'TMP',
title: '1μκ° κΈ°μ¨',
size: '2',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λ°λ',
category: 'VEC',
title: 'νν₯',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λ°λ',
category: 'WSD',
title: 'νμ',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λκΈ°',
category: 'SKY',
title: 'νλμν',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λΉ',
category: 'PCP',
title: '1μκ° κ°μλ',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
],
[
{
sort: 'λκΈ°',
category: 'SKY',
title: 'νλμν',
size: '2',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λκΈ°',
category: 'TMP',
title: '1μκ° κΈ°μ¨',
size: '2',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λΉ',
category: 'POP',
title: 'κ°μνλ₯ ',
size: '2',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λΉ',
category: 'PCP',
title: '1μκ° κ°μλ',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λΉ',
category: 'REH',
title: 'μ΅λ',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λ°λ',
category: 'WSD',
title: 'νμ',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
{
sort: 'λ°λ',
category: 'VEC',
title: 'νν₯',
size: '1',
color: colorChip[Math.floor(Math.random() * colorChip.length)],
},
],
];
const navigate = useNavigate();
const navigateSetup = () => {
navigate('/setup');
};
const navigateMain = () => {
navigate('/main');
};
const setStoreInitialData = (id: string) => {
setStartData(initialData[Number(id) - 1]);
};
return (
<>
<Wrapper>
<LogoWrapper>
<Logo src="/assets/sun.png" />
<AppTitle>NALGGU</AppTitle>
</LogoWrapper>
<HelloWrapper>
<Hello>
μλ
νμΈμ. μ λ <span>λ κΎΈ</span>μμ! <br />
<br />
<span className="SubContent">μ μκ² κΆκΈνκ² λ¬΄μμΈκ°μ? μ νν΄μ£ΌμΈμ!</span>
</Hello>
</HelloWrapper>
<BoxWrapper>
{presetData.presets.map((presetData) => (
<div
key={presetData.id}
style={{ width: '100%' }}
onClick={() => {
setStoreInitialData(presetData.id);
navigateMain();
}}
>
<StartSelectBox
key={presetData.id}
title={presetData.title}
icon={presetData.icon}
color={presetData.color}
/>
</div>
))}
<Divider></Divider>
<div style={{ width: '100%' }} onClick={navigateSetup}>
<StartSelectBox
title={presetData.selfCustom[0].title}
icon={presetData.selfCustom[0].icon}
color={presetData.selfCustom[0].color}
/>
</div>
</BoxWrapper>
</Wrapper>
</>
);
};
const Wrapper = styled.div`
padding-top: 3rem;
padding-bottom: 3rem;
display: flex;
flex-direction: column;
padding-left: 7rem;
padding-right: 7rem;
user-select: none;
@media screen and (max-width: 32rem) {
padding-left: 4rem;
padding-right: 4rem;
}
`;
const LogoWrapper = styled.div`
display: flex;
align-items: center;
@media screen and (max-width: 32rem) {
font-size: 0.5rem;
}
`;
const HelloWrapper = styled.div`
display: flex;
justify-content: flex-start;
margin-top: 2.5rem;
margin-bottom: 2.5rem;
`;
const Hello = styled.div`
font-size: 2rem;
font-weight: bolder;
span {
color: #6d39ff;
}
@media screen and (max-width: 32rem) {
font-size: 1.5rem;
}
.SubContent {
color: black;
font-size: 1.5rem;
@media screen and (max-width: 32rem) {
font-size: 1rem;
}
}
`;
const AppTitle = styled.span`
font-size: 2rem;
font-weight: bold;
@media screen and (max-width: 32rem) {
font-size: 1rem;
}
`;
const Logo = styled.img`
width: 5rem;
margin-right: 0.5rem;
@media screen and (max-width: 32rem) {
width: 3rem;
}
`;
const Divider = styled.div`
width: 100%;
margin-bottom: 2rem;
border-top: solid 2px lightgray;
`;
const BoxWrapper = styled.div`
display: flex;
flex-direction: column;
align-items: center;
`;
export default Start;
μμ§ λ¦¬μ‘νΈλ μν°λ°, νμ
μ μ
νκ³ μ€νμΌλ μ»΄ν¬λνΈ, 리μ½μΌ λ±μ λ€λ£¨λ κ² μ λ§ μ λ§ μ΄λ €μ κ³ νΌμ μ΄ν΄νλ €κ³ μ΄μ¬ν ꡬκΈλ§νκ³ μ°Ύμ보면μ μ§ννλ€.
μμ§ν μ λΆ λ΄κ° μμ±ν μ½λλ μλλΏλλ¬, 루μ΄μ μνμΉ΄κ° ν¨κ» νλ©° μ§ννμκΈ°μ μ΄ μ λ κ²°κ³Όκ° λμ¬ μ μμλ€.
λ§λ¬΄λ¦¬ νκ³
μ¬μ€ μμ§ λ°°μΈ κ²μ΄ λ§μ μ€λ ₯μ΄κΈ°μ, μ΄λ² νλ‘μ νΈμμλ λ§μ μ¬λλ€μ λ§λκ³ νμ
νλ νλ‘μΈμ€λ₯Ό λ°°μ°κ³ μΆμ κ² κ°μ₯ μ΅μ°μ μ΄μλ€.
루μ΄, μνμΉ΄, ν, λΈμ΄, ν€μ΄λ , μλ§, κ°λ λͺ¨λλͺ¨λ λ₯κΈλ₯κΈνκ³ μλ₯μλ₯ν μ¬λλ€μ΄ λͺ¨μ¬μ μλ‘ μλ―Όν λΆλΆλ€ νλ μμ΄ μ¦κ²κ² νλ‘μ νΈλ₯Ό μ§νν μ μμλ€.(μλ‘ μμ λͺ¨λ₯΄λ μ¬λλ€ 8λͺ
μ΄ λͺ¨μ¬μ μ΄ μ λλ‘ νΈλ¬λΈ, λ§μ°° μμ΄ μΌμ΄ μ§νλλ κ² μ κΈ°νμ μ λ)
λ, κ°λ° 곡λΆλ₯Ό μμνκ³ μ΄λ κ² λ§μ μΈμλ€κ³Ό νλ‘μ νΈλ₯Ό ν΄λ³Έ κ²½νμ΄ μμκΈ°μ λλλ κ°μ§κ³ μμ€ν μκ°μ΄μλ€. μ λ§ μ½ 5μΌμ΄λΌλ μκ°μ΄ ν루루루룩 κ°κ³ λ§€μΌ μλ²½ λ¦κ²κΉμ§ μ€ν°λμΉ΄νμμ, κ²λνμ΄μμ νλ‘μ νΈλ μ§ννκ³ μμν μ΄μΌκΈ°λ€λ μ£Όκ³ λ°μ κ² κΈ°μ΅μ λ§μ΄ λ¨λλ€.
μ’ λ μκ°μ΄ μκ³ , μ’ λ λλΌλ μ¬λμ μ€λ ₯μ΄ λμμ§λ©΄ λλ μλ―Έμκ³ μμ±λ μλ μλΉμ€λ₯Ό λ§λ€ μ μμ κ²μ΄λ νμ μ μ»μκ³ νμλ€μ 보며 λ ν° μμλ ν€μΈ μ μμλ€.
μ΄λ κ² μ’μ κ²½νμ νκ² ν΄μ€ ν
μ€μκ² μ λ§ κ°μ¬λλ¦¬κ³ , μ°λ¦¬ λ κΎΈλ₯Ό ν¨κ»λ§λ 7λͺ
μ νμλ€μκ²λ μ λ§ μ λ§ κ°μ¬λλ¦°λ€.
μ¬μ€ λ κΈΈκ² μμΈν μ μ μ μμ§λ§, μΌλ¨μ μ΄ μ λλ‘ μ κ³ μΆν λ μΆκ°λλ λ΄μ©μΌλ‘ μ 리νλ € νλ€. π