-
Notifications
You must be signed in to change notification settings - Fork 1
[feat] dashboard restore #122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ea0aa1f
๐ fix: null check for assignee
devmanta 60f32c1
๐ style: check assignee exist
devmanta 65b70dc
โจ feat: set dashboard to null if deleted
devmanta e2d3ebe
โจ feat: add toast message after update or delete
devmanta 3204c43
โป๏ธ refactor: refetch dashboards if data is changed and add toast msg
devmanta ffbac8e
โฐ๏ธ remove: remove dead code
devmanta d022a53
๐ style: skeleton linear effect
devmanta f7c9ebd
๐ style: add no wrap for card column label
devmanta 48c7145
๐ style: remove button outline
devmanta b5991c5
๐ style: add z-index on header dropdown menu
devmanta 5e5ac62
๐ style: responsivce css
devmanta 1c29b9c
๐ style: modal height
devmanta aa91e1a
โป๏ธ refactor: remove header my menu if ouside clicked
devmanta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
10 changes: 7 additions & 3 deletions
10
src/app/(with-header-sidebar)/dashboard/[id]/edit/_components/DeleteButton.tsx
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -6,13 +6,22 @@ import Button from '../Button'; | |
| import useDashboards from '@/app/(with-header-sidebar)/mydashboard/_hooks/useDashboards'; | ||
| import useDashboardStore from '@/store/dashboardStore'; | ||
| import styles from './Dashboards.module.css'; | ||
| import { useEffect } from 'react'; | ||
| import useDashboardTriggerStore from '@/store/dashboardTriggerStore'; | ||
|
|
||
| const PAGE_SIZE = 12; | ||
|
|
||
| export default function Dashboards() { | ||
| const { page, dashboards, totalPages, handlePageChange } = useDashboards({ | ||
| pageSize: PAGE_SIZE, | ||
| }); | ||
| const { trigger } = useDashboardTriggerStore(); | ||
|
|
||
| const { page, dashboards, totalPages, handlePageChange, refetch } = | ||
| useDashboards({ | ||
| pageSize: PAGE_SIZE, | ||
| }); | ||
|
|
||
| useEffect(() => { | ||
| refetch(); | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ์ด๊ฑด useDashboards์์ ๊ฐ์ ธ๋ค์ฐ๋ useApi๊ฐ ๊ตฌ์กฐ์ ์ผ๋ก ๋ฌธ์ ?๊ฐ์์ด์ (useApi ๋ถ๋ฌ์ค๋ฉด ๋ฐ๋กapi๋ฅผ ๋จผ์ ์จ) |
||
| }, [trigger]); | ||
|
|
||
| if (dashboards.length === 0) { | ||
| return null; | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 { create } from 'zustand'; | ||
|
|
||
| interface DashboardTriggerStore { | ||
| trigger: boolean; | ||
| updateTrigger: () => void; | ||
| } | ||
|
|
||
| const useDashboardTriggerStore = create<DashboardTriggerStore>((set) => ({ | ||
| trigger: false, | ||
| updateTrigger: () => set((state) => ({ trigger: !state.trigger })), | ||
| })); | ||
|
|
||
| export default useDashboardTriggerStore; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ด๋น์์์๋ ์์ ๋๋ฅด๋ฉด ์๋ฌ๋์ ์ถ๊ฐํ์ด๋ค