-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Feature/#45 team profile
- Loading branch information
Showing
45 changed files
with
1,457 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
import { TeamTypes } from 'types/team'; | ||
import { PostType } from 'types/post'; | ||
import { MemberTypes, TeamEditForm, TeamTypes } from 'types/team'; | ||
import BaseAPI from './base.api'; | ||
|
||
import type { CustomAxiosRequestConfig } from './type'; | ||
|
||
class TeamsAPI extends BaseAPI { | ||
//https://apibora.shop/api/team/ | ||
createTeam(body: TeamEditForm, config: CustomAxiosRequestConfig) { | ||
return this.post(``, body, config); | ||
} | ||
checkTeamProfile(params: unknown) { | ||
return this.get<TeamTypes>(`/${params}`); | ||
} | ||
|
||
// editUser(params: unknown, body: UserEditForm, config: CustomAxiosRequestConfig) { | ||
// return this.put(`/${params}`, body, config); | ||
// } | ||
// kakaoOauth(body, config?: CustomAxiosRequestConfig) { | ||
// return this.post<PostOauthBody, PostOauthResponse>('kakao', body, { ...config }); | ||
// } | ||
// googleOauth(body, config?: CustomAxiosRequestConfig) { | ||
// return this.post<PostOauthBody, PostOauthResponse>('google', body, { ...config }); | ||
// } | ||
getTeamMembers(params: unknown) { | ||
return this.get<MemberTypes[]>(`/${params}/members`); | ||
} | ||
getTeamPosts(params: unknown) { | ||
return this.get<PostType[]>(`/${params}/posts`); | ||
} | ||
editTeamProfile(params: unknown, body: TeamEditForm, config: CustomAxiosRequestConfig) { | ||
return this.put(`${params}`, body, config); | ||
} | ||
deleteTeam(params: unknown, config: CustomAxiosRequestConfig) { | ||
return this.delete(`${params}`, config); | ||
} | ||
} | ||
|
||
export default new TeamsAPI('team'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
const AcceptApplyButton = () => { | ||
return <AcceptButton>수락</AcceptButton>; | ||
}; | ||
|
||
export default AcceptApplyButton; | ||
|
||
const AcceptButton = styled.button` | ||
width: 153px; | ||
height: 48px; | ||
background: ${({ theme }) => theme.color.PressedPrimaryGreen}; | ||
border-radius: 4px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
font-weight: ${({ theme }) => theme.fontWeight.medium}; | ||
font-size: 16px; | ||
line-height: 1.4375; | ||
margin-right: 10px; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
const ExportMemberButton = () => { | ||
return <ExportButton>내보내기</ExportButton>; | ||
}; | ||
|
||
export default ExportMemberButton; | ||
|
||
const ExportButton = styled.button` | ||
width: 153px; | ||
height: 48px; | ||
background: ${({ theme }) => theme.color.gray_200}; | ||
border-radius: 4px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
font-weight: ${({ theme }) => theme.fontWeight.medium}; | ||
font-size: 16px; | ||
line-height: 1.4375; | ||
margin-right: 10px; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
|
||
import { ImgWrapper } from 'pages/profile'; | ||
|
||
import { default_profile } from 'constants/imgUrl'; | ||
import { Keyword } from 'components/common/Atomic/Tabs/Keyword'; | ||
import { numberWithCommas } from 'utils/numberWithCommas'; | ||
|
||
interface Props { | ||
leftButton: JSX.Element; | ||
rightButton: JSX.Element; | ||
} | ||
|
||
const ManagedMemberCard = ({ leftButton, rightButton }: Props) => { | ||
return ( | ||
<CardContainer> | ||
<div> | ||
<ImgWrapper alt="icon-profile" src={default_profile} width={58} height={58} /> | ||
|
||
<InfoSection> | ||
<h1>멤버명</h1> | ||
<div> | ||
<Keyword>일러스트레이션</Keyword> | ||
</div> | ||
<CountContainer> | ||
<span>팔로워</span> | ||
<span>{numberWithCommas(22222)}</span> | ||
<span>팔로잉</span> | ||
<span>{numberWithCommas(2222)}</span> | ||
<span>작업물</span> | ||
<span>{numberWithCommas(2222)}</span> | ||
</CountContainer> | ||
</InfoSection> | ||
</div> | ||
<div> | ||
{leftButton} | ||
{rightButton} | ||
</div> | ||
</CardContainer> | ||
); | ||
}; | ||
|
||
export default ManagedMemberCard; | ||
|
||
const CardContainer = styled.div` | ||
width: 364px; | ||
height: 194px; | ||
background-color: ${({ theme }) => theme.color.white}; | ||
border: 1px solid ${({ theme }) => theme.color.gray_400}; | ||
border-radius: 12px; | ||
padding: 24px; | ||
& > div { | ||
display: flex; | ||
align-items: center; | ||
} | ||
`; | ||
|
||
const InfoSection = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
margin-left: 24px; | ||
margin-bottom: 9px; | ||
& h1 { | ||
font-weight: ${({ theme }) => theme.fontWeight.medium}; | ||
font-size: 16px; | ||
line-height: 1.4375; | ||
letter-spacing: 0.02em; | ||
color: ${({ theme }) => theme.color.profileNameBlack}; | ||
display: flex; | ||
align-items: center; | ||
margin-bottom: 8px; | ||
} | ||
& > p { | ||
width: 342px; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
} | ||
`; | ||
const CountContainer = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
span { | ||
font-weight: 400; | ||
font-size: 12px; | ||
line-height: 1.833333; | ||
letter-spacing: -0.01em; | ||
color: ${({ theme }) => theme.color.gray_400}; | ||
margin-right: 8px; | ||
} | ||
span:nth-child(2n-1) { | ||
margin-right: 4px; | ||
color: ${({ theme }) => theme.color.gray_700}; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from 'react'; | ||
import Image from 'next/image'; | ||
import styled from 'styled-components'; | ||
import { message_icon } from 'constants/imgUrl'; | ||
const MessageButton = () => { | ||
return ( | ||
<MessageBtn> | ||
<figure> | ||
<Image src={message_icon} width={24} height={24} /> | ||
</figure> | ||
메시지 | ||
</MessageBtn> | ||
); | ||
}; | ||
|
||
export default MessageButton; | ||
|
||
const MessageBtn = styled.button` | ||
width: 153px; | ||
height: 48px; | ||
background: ${({ theme }) => theme.color.PressedPrimaryGreen}; | ||
border-radius: 4px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
font-weight: ${({ theme }) => theme.fontWeight.medium}; | ||
font-size: 16px; | ||
line-height: 1.4375; | ||
& > figure { | ||
margin-right: 12px; | ||
position: relative; | ||
top: 1.2px; | ||
display: flex; | ||
align-items: center; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
import { QuitButton } from 'components/common/Atomic/Tabs/Button'; | ||
|
||
const QuitTeam = () => { | ||
return ( | ||
<QuitButton> | ||
<span>팀 나가기</span> | ||
</QuitButton> | ||
); | ||
}; | ||
|
||
export default QuitTeam; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
const RejectApplyButton = () => { | ||
return <RejectButton>거절</RejectButton>; | ||
}; | ||
|
||
export default RejectApplyButton; | ||
|
||
const RejectButton = styled.button` | ||
width: 153px; | ||
height: 48px; | ||
background: ${({ theme }) => theme.color.gray_200}; | ||
border-radius: 4px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
font-weight: ${({ theme }) => theme.fontWeight.medium}; | ||
font-size: 16px; | ||
line-height: 1.4375; | ||
margin-right: 10px; | ||
`; |
Oops, something went wrong.