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

공통 상단 네비게이션 만들기 #235

Merged
merged 4 commits into from
Mar 13, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
✨ feat: 팀 등록 뷰에 네비게이션 적용
  • Loading branch information
NamJwong committed Mar 13, 2022
commit 0678f6188db607d83bdfa905f04ef6627f687591
84 changes: 44 additions & 40 deletions src/presentation/pages/Team/Register/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { useLoginUser } from '@hooks/useLoginUser';
import { api } from '@api/index';
import { useState } from 'react';
import { useEffect } from 'react';
import CommonNavigation from '@components/common/CommonNavigation';

function TeamRegister() {
const [isMemberSelectMode, setIsMemberSelectMode] = useState(false);
Expand Down Expand Up @@ -53,46 +54,49 @@ function TeamRegister() {
return (
<StTeamRegister>
{isMemberSelectMode && <TeamMembers onClickSubmitButton={closeMembers} />}
<StTeamRegisterWrapper>
<StTitle>팀 등록하기</StTitle>
<StAbsoluteWrapper>
<PhotoUpload width="104px" height="104px" borderRadius="36px" setFile={setImage}>
<ImgTeamAdd />
</PhotoUpload>
{!image && <StIcPencil />}
</StAbsoluteWrapper>
<CommonLabel content="팀 이름" marginTop="32px" marginBottom="18px" />
<CommonInput
value={name}
width="100%"
placeholder="팀 이름을 입력해주세요"
onChange={(name) => setName(name)}
/>
<CommonLabel content="팀에 관해 간략히 설명해주세요" marginTop="44px" />
<StTextarea
placeholder="설명을 입력해주세요"
value={description}
onChange={(e: React.ChangeEvent<HTMLTextAreaElement>) => setDescription(e.target.value)}
/>
<CommonLabel content="팀원을 추가해주세요" marginTop="44px" marginBottom="18px" />
<ProfileList
isSquare={false}
profileList={[
{ id: id, profileName: username, profileImage: profileImage ?? imgEmptyProfile },
...selectedUserList,
]}
onAddClick={() => setIsMemberSelectMode(true)}
/>
<StSubmitButton
onClick={() => {
submitTeamInfo();
navigate('/home/team');
}}
isActive={name.length > 0}
>
완료
</StSubmitButton>
</StTeamRegisterWrapper>
<>
<CommonNavigation />
<StTeamRegisterWrapper>
<StTitle>팀 등록하기</StTitle>
<StAbsoluteWrapper>
<PhotoUpload width="104px" height="104px" borderRadius="36px" setFile={setImage}>
<ImgTeamAdd />
</PhotoUpload>
{!image && <StIcPencil />}
</StAbsoluteWrapper>
<CommonLabel content="팀 이름" marginTop="32px" marginBottom="18px" />
<CommonInput
value={name}
width="100%"
placeholder="팀 이름을 입력해주세요"
onChange={(name) => setName(name)}
/>
<CommonLabel content="팀에 관해 간략히 설명해주세요" marginTop="44px" />
<StTextarea
placeholder="설명을 입력해주세요"
value={description}
onChange={(e: React.ChangeEvent<HTMLTextAreaElement>) => setDescription(e.target.value)}
/>
<CommonLabel content="팀원을 추가해주세요" marginTop="44px" marginBottom="18px" />
<ProfileList
isSquare={false}
profileList={[
{ id: id, profileName: username, profileImage: profileImage ?? imgEmptyProfile },
...selectedUserList,
]}
onAddClick={() => setIsMemberSelectMode(true)}
/>
<StSubmitButton
onClick={() => {
submitTeamInfo();
navigate('/home/team');
}}
isActive={name.length > 0}
>
완료
</StSubmitButton>
</StTeamRegisterWrapper>
</>
</StTeamRegister>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/pages/Team/Register/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const StTitle = styled.div`
font-weight: 600;
font-size: 24px;
color: ${COLOR.GRAY_8};
margin-top: 42px;
margin-top: 68px;
margin-bottom: 30px;
`;

Expand Down