-
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/#28 personal profile
- Loading branch information
Showing
36 changed files
with
26,772 additions
and
245 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
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,5 +1,5 @@ | ||
import { AxiosRequestConfig } from 'axios'; | ||
|
||
export interface CustomAxiosRequestConfig extends AxiosRequestConfig { | ||
isRequiredLogin?: boolean; | ||
} | ||
isRequiredLogin?: boolean; | ||
} |
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,15 +1,22 @@ | ||
import BaseAPI from './base.api'; | ||
|
||
import type { UserRegisterInfoType } from 'recoil/auth'; | ||
|
||
import { UserEditForm } from 'types/user'; | ||
import type { CustomAxiosRequestConfig } from './type'; | ||
class UsersAPI extends BaseAPI { | ||
checkUserName(params: unknown) { | ||
return this.get('/check_nickname', { params }); | ||
} | ||
checkUsers(params: unknown) { | ||
return this.get(`/${params}`); | ||
} | ||
registerUser(body: UserRegisterInfoType) { | ||
// id값이 서버에서 발급 받은 token 값을 의미하는지? | ||
return this.post(`/id`, body); | ||
} | ||
editUser(params: unknown, body: UserEditForm, config: CustomAxiosRequestConfig) { | ||
return this.put(`/${params}`, body, config); | ||
} | ||
} | ||
|
||
export default new UsersAPI('users'); |
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,24 @@ | ||
import React from 'react'; | ||
|
||
import ImageUploadWrapper from 'components/common/ImageUploadWrapper'; | ||
import { AddImageWrapper, AddImageSvg, AddImageText } from 'components/common/Atomic/AddItem'; | ||
|
||
interface Props { | ||
editMode: boolean; | ||
text: string; | ||
} | ||
|
||
const AddImage: React.FC<Props> = ({ editMode, text }) => { | ||
return ( | ||
<AddImageWrapper editMode={editMode}> | ||
<ImageUploadWrapper name="banner"> | ||
<div style={{ display: 'flex', flexDirection: 'column' }}> | ||
<AddImageSvg priority width={80} height={80} /> | ||
<AddImageText>{text}</AddImageText> | ||
</div> | ||
</ImageUploadWrapper> | ||
</AddImageWrapper> | ||
); | ||
}; | ||
|
||
export default AddImage; |
This file was deleted.
Oops, something went wrong.
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,16 +1,12 @@ | ||
import React, { useState } from 'react'; | ||
import { useRecoilValue } from 'recoil'; | ||
import React from 'react'; | ||
|
||
import * as S from './styles'; | ||
|
||
import AddImage from './AddImage'; | ||
|
||
import { userRegisterInfoState, UserRegisterInfoType } from 'recoil/auth'; | ||
|
||
const Banner: React.FC = () => { | ||
const [banner, setBanner] = useState<string>(); | ||
|
||
return <S.BannerWrapper url={banner}>{!banner && <AddImage text="프로필 배너를 추가 해주세요." />}</S.BannerWrapper>; | ||
interface Props { | ||
bannerImg: string; | ||
} | ||
const Banner: React.FC<Props> = ({ bannerImg, children }) => { | ||
return <S.BannerWrapper url={bannerImg}>{children}</S.BannerWrapper>; | ||
}; | ||
|
||
export default Banner; |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { DefaultTheme } from 'styled-components'; | ||
|
||
export interface styledProps { | ||
url?: string | ArrayBuffer | null; | ||
url?: string; | ||
theme: DefaultTheme; | ||
} |
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,18 @@ | ||
import React from 'react'; | ||
import { ProfileEditButton } from 'components/common/Atomic/Tabs/Button'; | ||
import Image from 'next/image'; | ||
|
||
interface Props { | ||
editMode: boolean; | ||
editModeOnOff: (flag: boolean) => () => void; | ||
} | ||
const ProfileEdit: React.FC<Props> = ({ editMode, editModeOnOff }) => { | ||
return ( | ||
<ProfileEditButton bgColor={editMode} onClick={editMode ? editModeOnOff(false) : editModeOnOff(true)}> | ||
<Image src="/images/profile-edit.svg" width={24} height={24} /> | ||
<span>{editMode ? '수정 완료' : '프로필 수정'}</span> | ||
</ProfileEditButton> | ||
); | ||
}; | ||
|
||
export default ProfileEdit; |
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,13 @@ | ||
import React from 'react'; | ||
import { UploadProductButton } from 'components/common/Atomic/Tabs/Button'; | ||
import Image from 'next/image'; | ||
const UploadProduct = () => { | ||
return ( | ||
<UploadProductButton bgColor> | ||
<Image src="/images/profile-edit-write2.svg" width={24} height={24} /> | ||
<span>작품 업로드</span> | ||
</UploadProductButton> | ||
); | ||
}; | ||
|
||
export default UploadProduct; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,14 @@ | ||
import React from 'react'; | ||
import { FollowButton } from 'components/common/Atomic/Tabs/Button'; | ||
import Image from 'next/image'; | ||
import { following_icon } from 'constants/imgUrl'; | ||
const Following = () => { | ||
return ( | ||
<FollowButton bgColor> | ||
<Image src={following_icon} width={24} height={24} /> | ||
<span>팔로우</span> | ||
</FollowButton> | ||
); | ||
}; | ||
|
||
export default Following; |
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,14 @@ | ||
import React from 'react'; | ||
import Image from 'next/image'; | ||
import { MessageButton } from 'components/common/Atomic/Tabs/Button'; | ||
import { message_icon } from 'constants/imgUrl'; | ||
const Message = () => { | ||
return ( | ||
<MessageButton> | ||
<Image src={message_icon} width={24} height={24} /> | ||
<span>메시지</span> | ||
</MessageButton> | ||
); | ||
}; | ||
|
||
export default Message; |
Oops, something went wrong.