-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from KUSITMS-29th-TEAM-D/develop
v0.1.1
- Loading branch information
Showing
70 changed files
with
1,956 additions
and
577 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
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,27 @@ | ||
import { authClient, noAuthClient } from '@/apis/client'; | ||
import { DefineRequest } from '@/types/test.type'; | ||
|
||
export const personaAPI = { | ||
// 페르소나 생성 | ||
register: async (member: boolean, userInfo: DefineRequest) => { | ||
if (member) { | ||
const response = await authClient.post('/api/personas/define', userInfo); | ||
return response.data; | ||
} | ||
|
||
const response = await noAuthClient.post('/api/personas/define', userInfo); | ||
return response.data; | ||
}, | ||
// 비로그인 유저 페르소나 조회 | ||
getPersona: async (personaId: string) => { | ||
const response = await noAuthClient.get( | ||
`/api/personas/define/sharing?define_persona_id=${personaId}` | ||
); | ||
return response.data; | ||
}, | ||
// 로그인 유저 페르소나 조회 | ||
getPersonaMember: async () => { | ||
const response = await authClient.get('/api/personas/define'); | ||
return response.data; | ||
}, | ||
}; |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,86 @@ | ||
import styled, { css } from 'styled-components'; | ||
|
||
import { ReactComponent as DownloadIcon } from '@/assets/icons/download.svg'; | ||
import { ReactComponent as KakaoIcon } from '@/assets/icons/kakaoIcon.svg'; | ||
|
||
interface ButtonProps { | ||
onClick?: () => void; | ||
} | ||
|
||
interface ShareButtonProps extends ButtonProps { | ||
desktop?: boolean; | ||
} | ||
|
||
export const KakaoShareButton = ({ onClick }: ButtonProps) => { | ||
return ( | ||
<StyledShareButton type="button" onClick={onClick}> | ||
<KakaoIcon /> | ||
<span>Kakao로 공유</span> | ||
<div style={{ width: '24px' }} /> | ||
</StyledShareButton> | ||
); | ||
}; | ||
|
||
export const DownloadButton = ({ onClick, desktop = false }: ShareButtonProps) => { | ||
return ( | ||
<StyledDownloadButton type="button" onClick={onClick} $desktop={desktop}> | ||
<DownloadIcon /> | ||
<span>이미지로 저장</span> | ||
<div style={{ width: '24px' }} /> | ||
</StyledDownloadButton> | ||
); | ||
}; | ||
|
||
const StyledButton = styled.button` | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
width: 100%; | ||
height: 48px; | ||
padding: 8px 16px; | ||
border-radius: 8px; | ||
span { | ||
${({ theme }) => theme.font.desktop.label1m}; | ||
} | ||
`; | ||
|
||
const StyledShareButton = styled(StyledButton)` | ||
background: #fee500; | ||
span { | ||
color: #191600; | ||
} | ||
&:hover { | ||
filter: brightness(80%); | ||
} | ||
`; | ||
|
||
const StyledDownloadButton = styled(StyledButton)<{ $desktop: boolean }>` | ||
${({ $desktop }) => | ||
$desktop | ||
? css` | ||
background: ${({ theme }) => theme.color.primary50}; | ||
span { | ||
color: ${({ theme }) => theme.color.primary700}; | ||
} | ||
&:hover { | ||
background: ${({ theme }) => theme.color.primary100}; | ||
} | ||
` | ||
: css` | ||
background: ${({ theme }) => theme.color.gray800}; | ||
span { | ||
color: ${({ theme }) => theme.color.white}; | ||
} | ||
svg path { | ||
fill: ${({ theme }) => theme.color.white}; | ||
} | ||
`} | ||
`; |
Oops, something went wrong.