diff --git a/src/page/history/History.css.ts b/src/page/history/History.css.ts index 766f01d2..e1997ed1 100644 --- a/src/page/history/History.css.ts +++ b/src/page/history/History.css.ts @@ -24,8 +24,8 @@ export const titleContainer = style({ }); export const descriptionContainer = style({ - marginTop: '2rem', - padding: '7.6rem 5rem', + marginTop: '2.3rem', + padding: '6.7rem 8.6rem', backgroundColor: colors.grey2, borderRadius: '12px', color: colors.grey11, @@ -37,7 +37,7 @@ export const descriptionContainer = style({ }); export const streakTrackerWrapper = style({ - paddingTop: '8rem', + paddingTop: '7.7rem', paddingBottom: '9.8rem', }); diff --git a/src/page/history/History.tsx b/src/page/history/History.tsx index b6b80e0e..fff895b2 100644 --- a/src/page/history/History.tsx +++ b/src/page/history/History.tsx @@ -5,6 +5,7 @@ import StreakTracker from '@/page/history/StreakTrackerSection/StreakTrackerSect import { useGetHistory } from '@/api/domain/history/hook/useGetHistory'; import { useMandalartId } from '@/common/hook/useMandalartId'; import Loading from '@/common/component/Loading/Loading'; +import { useAuthStore } from '@/store/useAuthStore'; const STREAK_BANNER_MESSAGE = '작은 실천을 66일 이어가면 나의 목표에 도달합니다'; const STREAK_DESCRIPTION_MESSAGE = '하루에 하나라도 실천하면 오늘의 점이 찍혀요!'; @@ -14,6 +15,7 @@ const History = () => { const mandalartId = useMandalartId(); const { data, isLoading } = useGetHistory(mandalartId); + const user = useAuthStore((state) => state.user); const handleOutsideClick = () => { setSelectedDay(null); @@ -28,7 +30,7 @@ const History = () => {

{data.title}

- 김도트님, 목표를 향해
+ {user.name}님, 목표를 향해
{data.progressDays}일째 달려가고 있어요

diff --git a/src/page/history/StreakTrackerSection/StreakTrackerSection.css.ts b/src/page/history/StreakTrackerSection/StreakTrackerSection.css.ts index 59ea258e..13453c07 100644 --- a/src/page/history/StreakTrackerSection/StreakTrackerSection.css.ts +++ b/src/page/history/StreakTrackerSection/StreakTrackerSection.css.ts @@ -4,3 +4,7 @@ export const streakTrackerContainer = style({ display: 'flex', gap: '2rem', }); + +export const streakGridContainer = style({ + flexGrow: '1', +}); diff --git a/src/page/history/StreakTrackerSection/StreakTrackerSection.tsx b/src/page/history/StreakTrackerSection/StreakTrackerSection.tsx index 6e7f9a12..f7fbfb65 100644 --- a/src/page/history/StreakTrackerSection/StreakTrackerSection.tsx +++ b/src/page/history/StreakTrackerSection/StreakTrackerSection.tsx @@ -1,7 +1,6 @@ import { useState } from 'react'; -import StreakDetail from '@/page/history/component/StreakDetail/StreakDetail'; -import StreakGrid from '@/page/history/component/StreakGrid/StreakGrid'; +import { StreakDetail, StreakGrid } from '@/page/history/component'; import * as styles from '@/page/history/StreakTrackerSection/StreakTrackerSection.css'; import { useGetStreak } from '@/api/domain/history/hook/useGetStreak'; import { useMandalartId } from '@/common/hook/useMandalartId'; @@ -32,7 +31,7 @@ const StreakTracker = ({ selectedDay, setSelectedDay }: StreakTrackerProps) => { return (
-
e.stopPropagation()}> +
e.stopPropagation()} className={styles.streakGridContainer}>
diff --git a/src/page/history/component/StreakDetail/StreakDetail.css.ts b/src/page/history/component/StreakDetail/StreakDetail.css.ts index 73c31d2b..05d3da25 100644 --- a/src/page/history/component/StreakDetail/StreakDetail.css.ts +++ b/src/page/history/component/StreakDetail/StreakDetail.css.ts @@ -1,7 +1,7 @@ import { recipe } from '@vanilla-extract/recipes'; import { style } from '@vanilla-extract/css'; -import { colors, fonts } from '@/style/token'; +import { colors, fonts, layout } from '@/style/token'; export const detailContainer = recipe({ base: { @@ -11,11 +11,7 @@ export const detailContainer = recipe({ }, variants: { state: { - empty: { - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - }, + empty: layout.flexCenter, filled: { padding: '3rem', }, @@ -43,11 +39,12 @@ export const todoCount = style({ ...fonts.subtitle01, }); -export const todoList = style({ - display: 'flex', - flexDirection: 'column', - gap: '1.2rem', - marginTop: '2.4rem', - color: colors.grey11, - ...fonts.body03, -}); +export const todoList = style([ + layout.flexColumn, + { + gap: '1.2rem', + marginTop: '2.4rem', + color: colors.grey11, + ...fonts.body03, + }, +]); diff --git a/src/page/history/component/StreakDetail/StreakDetail.tsx b/src/page/history/component/StreakDetail/StreakDetail.tsx index aab51300..a5b5866d 100644 --- a/src/page/history/component/StreakDetail/StreakDetail.tsx +++ b/src/page/history/component/StreakDetail/StreakDetail.tsx @@ -1,8 +1,6 @@ import * as styles from '@/page/history/component/StreakDetail/StreakDetail.css'; import type { Streak } from '@/page/history/type/StreakDataType'; -const DEFAULT_MESSAGE = '원하는 날의 점을 클릭하고
그날 내가 한 일을 확인해보세요!'; - type StreakDetailProps = { detailData?: Streak; }; @@ -14,7 +12,9 @@ const StreakDetail = ({ detailData }: StreakDetailProps) => { if (isEmpty) { return (
-

+

+ 원하는 날의 점을 클릭하고
그날 내가 한 일을 확인해보세요! +

); } diff --git a/src/page/history/component/index.ts b/src/page/history/component/index.ts new file mode 100644 index 00000000..da0b5fad --- /dev/null +++ b/src/page/history/component/index.ts @@ -0,0 +1,2 @@ +export { default as StreakDetail } from '@/page/history/component/StreakDetail/StreakDetail'; +export { default as StreakGrid } from '@/page/history/component/StreakGrid/StreakGrid';