Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] #13 - 확정 페이지 구현 #14

Merged
merged 5 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
786 changes: 706 additions & 80 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ import Create from "@pages/create/Create";
import Test from "@pages/test/Test";
import Invite from "@pages/invite/Invite";
import Result from "@pages/result/Result";
import Confirm from "@pages/confirm/Confirm";

const Router: React.FC = () => {
return (
<BrowserRouter>
<Routes>
<Route path="/login" element={<Login />} />
<Route path="/create" element={<Create />} />
<Route path="test/:page" element={<Test />} />
<Route path="/test/:page" element={<Test />} />
<Route path="/invite" element={<Invite />} />
<Route path="/result" element={<Result />} />
<Route path="/confirm" element={<Confirm />} />
</Routes>
</BrowserRouter>
);
Expand Down
12 changes: 12 additions & 0 deletions src/components/common/container/style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import styled from "styled-components";

export const Container = styled.div`
margin-top: 5%;
width: 90%;
min-height: 100vh;
display: flex;
justify-content: space-around;
align-items: center;
flex-direction: column;
gap: 2rem;
`;
10 changes: 10 additions & 0 deletions src/components/common/wrapper/style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import styled from "styled-components";

export const Wrapper = styled.div`
display: flex;
width: 100%;
justify-content: center;
align-items: center;
gap: 2rem;
flex-direction: column;
`;
2 changes: 1 addition & 1 deletion src/components/create/TeamButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import { useState } from "react";
import * as S from "./style";

export default function TeamButton() {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useUserProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const useUserProfile = () => {
);
setResponse(response);
} catch (err) {
// console.log(error);
setError("박세호");
}
};
useEffect(() => {
Expand Down
38 changes: 38 additions & 0 deletions src/pages/confirm/Confirm.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { Container } from "@components/common/container/style";
import { Wrapper } from "@components/common/wrapper/style";
import HintText2 from "@components/common/hintText/HintText2";
import { InputContainer } from "./_components/inputContainer/InputContainer";
import Button from "@components/common/button/Button";

const Confirm: React.FC = () => {
return (
<Container>
<Wrapper>
<Wrapper>
<HintText2
headline="이제 직접 소통해봐요."
paragraph="이제부터는 ‘팀장’만 작성할 수 있어요.
팀원들과 상의해서 우리 팀은 어떤 팀인지 정해봐요."
/>
</Wrapper>
<Wrapper>
<InputContainer label="팀명" defaultText="팀명을 적어주세요!" />
<InputContainer
label="우리팀만의 규칙"
defaultText="1. 매일 데일리 스크럼 진행하기
2. 본인의 의견 확실하게 밝히기
3. 시간 나면 온라인 모각코 같이 진행하기"
isTextArea={true}
/>
<InputContainer
label="우리팀의 목표"
defaultText="팀 목표를 적어주세요!"
/>
</Wrapper>
</Wrapper>
<Button name="동기화 끝내기" link={`/next`} $width="100%" />
</Container>
);
};

export default Confirm;
24 changes: 24 additions & 0 deletions src/pages/confirm/_components/inputContainer/InputContainer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import * as S from "./style";

interface InputContainerProps {
label: string;
defaultText: string;
isTextArea?: boolean;
}

export const InputContainer = ({
label,
defaultText,
isTextArea,
}: InputContainerProps) => {
return (
<S.InputWrapper>
<S.Label>{label}</S.Label>
{isTextArea ? (
<S.TextArea placeholder={defaultText} />
) : (
<S.Input placeholder={defaultText} />
)}
</S.InputWrapper>
);
};
33 changes: 33 additions & 0 deletions src/pages/confirm/_components/inputContainer/style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import styled from "styled-components";

export const InputWrapper = styled.div`
width: 100%;
display: flex;
flex-direction: column;
gap: 0.5rem;
`;

export const Label = styled.label`
font-family: Pretendard;
font-size: 12px;
font-style: normal;
font-weight: 500;
letter-spacing: -0.1px;
padding: 0.2rem;
`;

export const Input = styled.input`
width: 100%;
height: 3rem;
border-radius: 8px;
border: 1px solid #ced4da;
padding: 0 0.5rem;
`;

export const TextArea = styled.textarea`
width: 100%;
height: 10rem;
border-radius: 8px;
border: 1px solid #ced4da;
padding: 0.5rem;
`;
Empty file added src/pages/confirm/style.ts
Empty file.
19 changes: 10 additions & 9 deletions src/pages/result/Result.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as S from "./style";
import { Container } from "@components/common/container/style";
import { Wrapper } from "@components/common/wrapper/style";
import HintText2 from "@components/common/hintText/HintText2";
import { ResultCard } from "./_components/ResultCard";
import Button from "@components/common/button/Button";
Expand All @@ -15,24 +16,24 @@ const SECOND_MOCK_TEXT: string[] = [

const Result: React.FC = () => {
return (
<S.Container>
<S.ContentWrapper>
<Container>
<Wrapper>
<HintText2
headline="AI가 분석한 팀의 성향입니다."
paragraph="각 팀원들이 답변한 내용을 토대로 팀의 성향을 진단해줘요.
우리 팀 성향이 맞는지 확인해보고, 팀원들과 상의해볼까요?"
/>
<S.ContentWrapper>
<Wrapper>
<ResultCard
title="AI가 진단한 F4 팀의 성향 요약"
title="AI가 진단한 팀의 성향 요약"
contents={FIRST_MOCK_TEXT}
/>
<ResultCard title="F4 팀 방향성 조언" contents={SECOND_MOCK_TEXT} />
</S.ContentWrapper>
</S.ContentWrapper>
<ResultCard title="팀 방향성 조언" contents={SECOND_MOCK_TEXT} />
</Wrapper>
</Wrapper>

<Button name="다음" link={`/next`} $width="100%" />
</S.Container>
</Container>
);
};

Expand Down
9 changes: 9 additions & 0 deletions vercel.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"version": 2,
"rewrites": [
{
"source": "/api/(.*)",
"destination": "test/$1"
}
]
}
3 changes: 3 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"routes": [{ "src": "/[^.]+", "dest": "/", "status": 200 }]
}