-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
15 changed files
with
250 additions
and
68 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { accessClient } from 'api'; | ||
|
||
interface File { | ||
content_length: number; | ||
content_type: string; | ||
file_name: string; | ||
} | ||
|
||
export interface FileResponse { | ||
pre_signed_url: string; | ||
file_url: string; | ||
expiration_date: string; | ||
} | ||
|
||
export const uploadFile = (formData: FormData) => accessClient.post('/OWNERS/upload/file', formData, { | ||
headers: { 'Content-Type': 'multipart/form-data' }, | ||
}).catch((error) => Promise.reject(error)); | ||
|
||
export const uploadFiles = (formData: FormData) => accessClient.post('/OWNERS/upload/files', formData, { | ||
headers: { 'Content-Type': 'multipart/form-data' }, | ||
}); | ||
|
||
export const getCoopUrl = (fileName: File) => accessClient.post<FileResponse>('/coop/upload/url', fileName); |
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,88 @@ | ||
.button { | ||
&--large { | ||
font-size: 16px; | ||
width: 100%; | ||
background-color: #175c8e; | ||
color: #ffffff; | ||
border: none; | ||
height: 48px; | ||
|
||
&:hover { | ||
cursor: pointer; | ||
} | ||
|
||
&:disabled { | ||
background-color: #c4c4c4; | ||
|
||
&:hover { | ||
cursor: auto; | ||
} | ||
} | ||
} | ||
|
||
&--small { | ||
font-size: 14px; | ||
width: 80px; | ||
background-color: #175c8e; | ||
color: #ffffff; | ||
border: none; | ||
height: 48px; | ||
padding: 0 10px; | ||
|
||
&:hover { | ||
cursor: pointer; | ||
} | ||
|
||
&:disabled { | ||
background-color: #c4c4c4; | ||
|
||
&:hover { | ||
cursor: auto; | ||
} | ||
} | ||
} | ||
|
||
&--mobile { | ||
width: 48%; | ||
height: 48px; | ||
font-weight: 500; | ||
font-size: 15px; | ||
background-color: #175c8e; | ||
color: #ffffff; | ||
border: none; | ||
|
||
&:hover { | ||
cursor: pointer; | ||
} | ||
|
||
&:disabled { | ||
background-color: #c4c4c4; | ||
|
||
&:hover { | ||
cursor: auto; | ||
} | ||
} | ||
} | ||
|
||
&--mobile-small { | ||
width: 83px; | ||
height: 37px; | ||
font-weight: 500; | ||
font-size: 15px; | ||
background-color: #175c8e; | ||
color: #ffffff; | ||
border: none; | ||
|
||
&:hover { | ||
cursor: pointer; | ||
} | ||
|
||
&:disabled { | ||
background-color: #c4c4c4; | ||
|
||
&:hover { | ||
cursor: auto; | ||
} | ||
} | ||
} | ||
} |
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,25 @@ | ||
import styles from './CustomButton.module.scss'; | ||
|
||
interface ButtonProps { | ||
content:string, | ||
// 80px | 부모 요소의 절반 width | 부모요소 전체 width | 83px | ||
buttonSize: 'small' | 'mobile' | 'large' | 'mobile-small', | ||
disable?: boolean, | ||
submit?:boolean | ||
onClick?: () => void | ||
} | ||
|
||
export default function CustomButton({ | ||
content, buttonSize, disable, onClick, submit, | ||
}:ButtonProps) { | ||
return ( | ||
<button | ||
type={submit ? 'submit' : 'button'} | ||
className={`${styles[`button--${buttonSize}`]}`} | ||
onClick={onClick} | ||
disabled={!!disable} | ||
> | ||
{content} | ||
</button> | ||
); | ||
} |
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
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,31 @@ | ||
import { Dining } from 'models/dinings'; | ||
import useToggleStore from 'store/useToggleStore'; | ||
|
||
import styles from './SoldOutToggleButton.module.scss'; | ||
|
||
interface Props { | ||
onClick: () => void; | ||
menu: Dining; | ||
} | ||
|
||
function SoldOutToggleButton({ onClick, menu }: Props) { | ||
const { toggleSoldOut } = useToggleStore(); | ||
const handleToggle = () => { | ||
onClick(); | ||
toggleSoldOut(menu.id); | ||
}; | ||
|
||
return ( | ||
<div> | ||
<button | ||
type="button" | ||
className={styles['toggle-button']} | ||
onClick={handleToggle} | ||
> | ||
버튼 | ||
</button> | ||
</div> | ||
); | ||
} | ||
|
||
export default SoldOutToggleButton; |
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 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
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
Oops, something went wrong.