-
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.
* feat: Toast 폴더 분리 * feat: 토스트 핸들러 함수 위치 이동 * feat: 토스트 메시지 매개변수 추가 * feat: 토스트 아이콘 매개변수 추가 * feat: Carousel widgets 폴더로 이동 * feat: 피드 목록 조회 delay 제거 * feat: 아이폰 최소 및 초기 사이즈 75%로 수정 * feat: 아이폰 레이아웃 미디어쿼리 최소 너비 수정 Closes #60
- Loading branch information
Showing
20 changed files
with
52 additions
and
44 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
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,2 +1 @@ | ||
export * from './handleQuery'; | ||
export * from './toastHandlers'; |
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 @@ | ||
export * from './toastHandlers'; |
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,33 @@ | ||
import { Bounce, toast } from 'react-toastify'; | ||
|
||
import { Icon } from '@/shared/ui'; | ||
import { IconName } from '@/shared/ui/icon'; | ||
|
||
const id = 'react-query-toast'; | ||
|
||
/** | ||
* reference: https://fkhadra.github.io/react-toastify/api/toast | ||
* 메시지를 토스트 메시지로 변환합니다. | ||
* @param iconName 아이콘 이름 | ||
* @param message 메시지 | ||
*/ | ||
export function showToastHandler(iconName: IconName, message: string) { | ||
if (!toast.isActive(id)) { | ||
toast(message, { | ||
toastId: id, | ||
autoClose: 3000, | ||
position: 'bottom-center', | ||
transition: Bounce, | ||
icon: <Icon name={iconName} width='20' height='20' />, | ||
}); | ||
} | ||
} | ||
|
||
/** | ||
* 화면에 표시되어 있는 토스트를 제거합니다. | ||
*/ | ||
export function removeToastHandler() { | ||
if (toast.isActive(id)) { | ||
toast.dismiss(id); | ||
} | ||
} |
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,2 @@ | ||
export { Toast } from './ui'; | ||
export * from './dir'; |
File renamed without changes.
6 changes: 2 additions & 4 deletions
6
...network-error-toast/NetworkErrorToast.tsx → src/shared/toast/ui/Toast.tsx
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 @@ | ||
export { Toast } from './Toast'; |
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 +1,2 @@ | ||
export { Icon } from './ui'; | ||
export type { IconName } from './consts'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { Carousel } from './ui'; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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