diff --git a/apps/client/src/page/dashboard/component/File/FileSection.tsx b/apps/client/src/page/dashboard/component/File/FileSection.tsx index 27394e297..0aa1dd0f9 100644 --- a/apps/client/src/page/dashboard/component/File/FileSection.tsx +++ b/apps/client/src/page/dashboard/component/File/FileSection.tsx @@ -1,6 +1,8 @@ import { Flex, scrollStyle } from '@tiki/ui'; import { hasKeyInObject } from '@tiki/utils'; +import { useNavigate } from 'react-router-dom'; + import { dashboradScrollStyle } from '@/page/dashboard/DashboardPage.style'; import ItemAdder from '@/page/dashboard/component/ItemAdder/ItemAdder'; import { DocumentItem, FolderItem } from '@/page/drive/type'; @@ -14,6 +16,7 @@ import { File } from '@/shared/type/file'; import { extractFileExtension } from '@/shared/util/file'; const FileSection = () => { + const navigate = useNavigate(); const teamId = useInitializeTeamId(); const { data: fileData } = $api.useQuery('get', '/api/v1/teams/{teamId}/drive', { @@ -30,7 +33,11 @@ const FileSection = () => { const allFileData = [...docDataList, ...folderDataList]; return ( - + { + navigate(PATH.DRIVE); + }}> {!allFileData[0] && } {allFileData.map((item) => { if (hasKeyInObject(item, 'documentId')) { diff --git a/apps/client/src/page/dashboard/component/Handover/HandoverSection.tsx b/apps/client/src/page/dashboard/component/Handover/HandoverSection.tsx index afaacf9ba..83e0bd3da 100644 --- a/apps/client/src/page/dashboard/component/Handover/HandoverSection.tsx +++ b/apps/client/src/page/dashboard/component/Handover/HandoverSection.tsx @@ -1,16 +1,17 @@ import { Flex, Spinner } from '@tiki/ui'; +import { useNavigate } from 'react-router-dom'; + import { listItemStyle } from '@/page/dashboard/component/Handover/HandoverSection.style'; import ListItem from '@/page/dashboard/component/Handover/ListItem/ListItem'; import ItemAdder from '@/page/dashboard/component/ItemAdder/ItemAdder'; import { useNoteData } from '@/page/handover/hook/api/queries'; import { PATH } from '@/shared/constant/path'; -import { useCurrentDate } from '@/shared/hook/common/useCurrentDate'; const HandoverSection = () => { - const createdAt = useCurrentDate(); - const { data, isPending } = useNoteData(createdAt); + const navigate = useNavigate(); + const { data, isPending } = useNoteData(''); return ( @@ -20,7 +21,17 @@ const HandoverSection = () => { ) : ( data?.data?.noteGetResponseList.map((note) => { - return ; + return ( + { + navigate(`${PATH.HANDOVER}/${note.noteId}`); + }} + /> + ); }) )} diff --git a/apps/client/src/shared/component/Header/AlarmButton.tsx b/apps/client/src/shared/component/Header/AlarmButton.tsx new file mode 100644 index 000000000..38f713fc2 --- /dev/null +++ b/apps/client/src/shared/component/Header/AlarmButton.tsx @@ -0,0 +1,18 @@ +import { IcAlertYes } from '@tiki/icon'; +import { Button } from '@tiki/ui'; + +const AlarmButton = () => { + return ( + + ); +}; + +export default AlarmButton; diff --git a/apps/client/src/shared/component/Header/Header.tsx b/apps/client/src/shared/component/Header/Header.tsx index ce69d7c24..34def8a09 100644 --- a/apps/client/src/shared/component/Header/Header.tsx +++ b/apps/client/src/shared/component/Header/Header.tsx @@ -1,8 +1,8 @@ -import { IcAlertYes } from '@tiki/icon'; import { Flex, Heading } from '@tiki/ui'; -import { useMatch } from 'react-router-dom'; +import { useMatch, useNavigate } from 'react-router-dom'; +import AlarmButton from '@/shared/component/Header/AlarmButton'; import { headerStyle } from '@/shared/component/Header/Header.style'; import InviteButton from '@/shared/component/Header/InviteButton'; import SettingButton from '@/shared/component/Header/SettingButton'; @@ -11,6 +11,7 @@ import { STORAGE_KEY } from '@/shared/constant/api'; import { PATH } from '@/shared/constant/path'; const Header = () => { + const navigate = useNavigate(); const title = localStorage.getItem(STORAGE_KEY.TEAM_NAME); const isDashboardPage = useMatch(PATH.DASHBOARD); @@ -25,12 +26,21 @@ const Header = () => { return (
- {isTitleVisible && {title}} + {isTitleVisible && ( + { + navigate(PATH.DASHBOARD); + }}> + {`${title} 워크스페이스`} + + )} {isRightSideVisible && (
- +
)} diff --git a/apps/client/src/shared/component/Header/SettingButton.tsx b/apps/client/src/shared/component/Header/SettingButton.tsx index 873c91880..77334d1bf 100644 --- a/apps/client/src/shared/component/Header/SettingButton.tsx +++ b/apps/client/src/shared/component/Header/SettingButton.tsx @@ -11,8 +11,8 @@ const SettingButton = () => { const 워크스페이스설정페이지로 = () => navigate(PATH.WORKSPACE_SETTING); return ( - ); }; diff --git a/apps/client/src/shared/hook/common/useCurrentDate.ts b/apps/client/src/shared/hook/common/useCurrentDate.ts deleted file mode 100644 index f9c5f8750..000000000 --- a/apps/client/src/shared/hook/common/useCurrentDate.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { useRef } from 'react'; - -export const useCurrentDate = () => { - return useRef(new Date(new Date().getTime() + 9 * 60 * 60 * 1000).toISOString().slice(0, -1)).current; -};