-
Notifications
You must be signed in to change notification settings - Fork 2
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 #82 from jeiltodo/develop
Develop
- Loading branch information
Showing
79 changed files
with
1,802 additions
and
9,571 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,7 @@ | ||
import React from 'react'; | ||
|
||
const NotFoundPage = () => { | ||
return <h1>404 - Page Not Found</h1>; | ||
}; | ||
|
||
export default NotFoundPage; |
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,74 +1,3 @@ | ||
// const tableMock: User[] = [ | ||
// { | ||
// id: 1, | ||
// name: '가길동', | ||
// email: 'aohn@example.com', | ||
// createdAt: new Date(2024, 0, 1, 0, 0, 0, 0).toISOString(), | ||
// updatedAt: new Date(2024, 0, 1, 0, 0, 0, 0).toISOString(), | ||
// groupCount: 2, | ||
// }, | ||
// { | ||
// id: 2, | ||
// name: '나길동', | ||
// email: 'bohn@example.com', | ||
// createdAt: new Date(2024, 0, 2, 0, 0, 0, 0).toISOString(), | ||
// updatedAt: new Date(2024, 0, 2, 0, 0, 0, 0).toISOString(), | ||
// groupCount: 1, | ||
// }, | ||
// { | ||
// id: 3, | ||
// name: '다길동', | ||
// email: 'cohn@example.com', | ||
// createdAt: new Date(2024, 0, 3, 0, 0, 0, 0).toISOString(), | ||
// updatedAt: new Date(2024, 0, 3, 0, 0, 0, 0).toISOString(), | ||
// groupCount: 1, | ||
// }, | ||
// ]; | ||
|
||
// const GroupBoardMock: GroupBoardProps = { | ||
// user: { | ||
// id: 1, | ||
// email: 'johndoe@example.com', | ||
// name: 'John Doe', | ||
// createdAt: '2024-01-15T10:00:00Z', | ||
// updatedAt: '2024-07-10T15:00:00Z', | ||
// }, | ||
// groups: [ | ||
// { | ||
// id: 101, | ||
// name: 'Development Team', | ||
// registerAt: '2024-01-20T12:00:00Z', | ||
// }, | ||
// { | ||
// id: 102, | ||
// name: 'Design Team', | ||
// registerAt: '2024-02-05T14:30:00Z', | ||
// }, | ||
// { | ||
// id: 103, | ||
// name: 'A Team', | ||
// registerAt: '2024-02-05T14:30:00Z', | ||
// }, | ||
// { | ||
// id: 104, | ||
// name: 'B Team', | ||
// registerAt: '2024-02-05T14:30:00Z', | ||
// }, | ||
// ], | ||
// goals: [ | ||
// { | ||
// id: 201, | ||
// name: 'Improve code quality', | ||
// registerAt: '2024-03-01T09:00:00Z', | ||
// }, | ||
// { | ||
// id: 202, | ||
// name: 'Increase team collaboration', | ||
// registerAt: '2024-04-15T11:00:00Z', | ||
// }, | ||
// ], | ||
// }; | ||
|
||
export default function Page(): JSX.Element { | ||
return <main className='max-w-[930px] '></main>; | ||
} |
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,5 +1,5 @@ | ||
import { IndivDetailPage } from '../../../../page/goal'; | ||
import { IndividualGoalDetailPage } from '../../../../page/goal'; | ||
|
||
export default function Page({ params }: { params: { id: number } }) { | ||
return <IndivDetailPage params={params} />; | ||
return <IndividualGoalDetailPage params={params} />; | ||
} |
10 changes: 7 additions & 3 deletions
10
apps/user/src/app/(dashboard)/goal/group/[id]/[goalid]/page.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
import { GroupDetailPage } from '../../../../../../page/goal'; | ||
import { GroupGoalDetailPage } from '../../../../../../page/goal'; | ||
|
||
export default function Page({ params }: { params: { goalid: number } }) { | ||
return <GroupDetailPage params={params} />; | ||
export default function Page({ | ||
params, | ||
}: { | ||
params: { id: string; goalid: string }; | ||
}) { | ||
return <GroupGoalDetailPage params={params} />; | ||
} |
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,7 @@ | ||
import React from 'react'; | ||
|
||
const NotFoundPage = () => { | ||
return <h1>404 - Page Not Found</h1>; | ||
}; | ||
|
||
export default NotFoundPage; |
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
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,18 @@ | ||
import { useMutation, useQueryClient } from '@tanstack/react-query'; | ||
import { groupQueryKeys } from './queryKeys'; | ||
import { groupApi } from '../api/groupApi'; | ||
import { useToast } from '@jeiltodo/ui/shared'; | ||
|
||
export const useChangeLeader = (groupId: number) => { | ||
const queryClient = useQueryClient(); | ||
const showToast = useToast(); | ||
return useMutation({ | ||
mutationFn: (memberId: number) => groupApi.changeLeader(groupId, memberId), | ||
onSuccess: () => { | ||
queryClient.invalidateQueries({ | ||
queryKey: groupQueryKeys.detail(groupId), | ||
}); | ||
showToast({ message: '그룹장 변경 성공!', type: 'alert' }); | ||
}, | ||
}); | ||
}; |
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,18 @@ | ||
import { useMutation, useQueryClient } from '@tanstack/react-query'; | ||
import { groupGoalsApi } from '../../goal/api/groupGoalsApi'; | ||
import { useToast } from '@jeiltodo/ui/shared'; | ||
|
||
export const useCreateGroupGoal = (groupId: number) => { | ||
const queryClient = useQueryClient(); | ||
const showToast = useToast(); | ||
return useMutation({ | ||
mutationFn: (title: string) => | ||
groupGoalsApi.createGroupGoal(groupId, title), | ||
onSuccess: () => { | ||
queryClient.invalidateQueries({ | ||
predicate: (query) => query.queryKey.includes('goals'), | ||
}); | ||
showToast({ message: '목표 작성 성공!', type: 'alert' }); | ||
}, | ||
}); | ||
}; |
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 { useMutation, useQueryClient } from '@tanstack/react-query'; | ||
import { groupGoalsApi } from '../../goal/api/groupGoalsApi'; | ||
import { useToast } from '@jeiltodo/ui/shared'; | ||
|
||
export const useDeleteGroupGoal = (groupId: number) => { | ||
const queryClient = useQueryClient(); | ||
const showToast = useToast(); | ||
return useMutation({ | ||
mutationFn: ({ id }: { id: number }) => | ||
groupGoalsApi.deleteGroupGoal(groupId, id), | ||
onSuccess: () => { | ||
queryClient.invalidateQueries({ | ||
predicate: (query) => query.queryKey.includes('goals'), | ||
}); | ||
showToast({ message: '목표 삭제 성공!', type: 'alert' }); | ||
}, | ||
}); | ||
}; |
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,15 +1,18 @@ | ||
import { useMutation, useQueryClient } from '@tanstack/react-query'; | ||
import { groupQueryKeys } from './queryKeys'; | ||
import { groupApi } from '../api/groupApi'; | ||
import { useToast } from '@jeiltodo/ui/shared'; | ||
|
||
export const useRemoveMember = (groupId: number) => { | ||
const queryClient = useQueryClient(); | ||
const showToast = useToast(); | ||
return useMutation({ | ||
mutationFn: (memberId: number) => groupApi.removeMember(groupId, memberId), | ||
onSuccess: () => { | ||
queryClient.invalidateQueries({ | ||
queryKey: groupQueryKeys.detail(groupId), | ||
}); | ||
showToast({ message: '삭제 성공!', type: 'alert' }); | ||
}, | ||
}); | ||
}; |
Oops, something went wrong.