Skip to content
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

[Feat] 대시보드 뷰 1차 기능 QA #438

Merged
merged 5 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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', {
Expand All @@ -30,7 +33,11 @@ const FileSection = () => {
const allFileData = [...docDataList, ...folderDataList];

return (
<Flex css={[{ gap: '1.4rem', padding: '0 0 0.7rem', overflowX: 'scroll' }, scrollStyle, dashboradScrollStyle]}>
<Flex
css={[{ gap: '1.4rem', padding: '0 0 0.7rem', overflowX: 'scroll' }, scrollStyle, dashboradScrollStyle]}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요기 dashboradScrollStyle과 scrollStyle이 어떻게 다른 걸까유 ?
하나로 지정해줘도 될 것 같아요

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 스크롤 스타일은 글로벌스타일에서 가져온거구요
dashboardScrollStyle은 추가로 대시보드에서만 쓰이는 스크롤스타일 지정해줬습니다!

onClick={() => {
navigate(PATH.DRIVE);
}}>
{!allFileData[0] && <ItemAdder path={PATH.DRIVE} />}
{allFileData.map((item) => {
if (hasKeyInObject(item, 'documentId')) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 (
<Flex styles={{ direction: 'column', gap: '0.8rem', align: 'center' }} css={listItemStyle}>
Expand All @@ -20,7 +21,17 @@ const HandoverSection = () => {
<Spinner size={30} />
) : (
data?.data?.noteGetResponseList.map((note) => {
return <ListItem key={note.noteId} noteId={note.noteId} title={note.title} date={note.startDate} />;
return (
<ListItem
key={note.noteId}
noteId={note.noteId}
title={note.title}
date={note.startDate}
onClick={() => {
navigate(`${PATH.HANDOVER}/${note.noteId}`);
}}
/>
);
})
)}
</Flex>
Expand Down
5 changes: 0 additions & 5 deletions apps/client/src/shared/hook/common/useCurrentDate.ts

This file was deleted.

Loading