Skip to content
Open
5 changes: 1 addition & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"recommendations": [
"expo.vscode-expo-tools",
"bradlc.vscode-tailwindcss"
]
"recommendations": ["expo.vscode-expo-tools", "bradlc.vscode-tailwindcss"]
}
17 changes: 3 additions & 14 deletions app/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,22 @@
import { Tabs } from "expo-router";
import React from "react";

import { HapticTab } from "@/components/haptic-tab";
import { IconSymbol } from "@/components/ui/icon-symbol";
import { BottomTabBar } from "@/src/components/common/BottomTabBar";
import { Colors } from "@/constants/theme";
import { useColorScheme } from "@/hooks/use-color-scheme";

// 임시 - 공통 컴포넌트 구현 후 교체 예정
// 네비게이션 탭으로 이동하여 보여지는 페이지들을 라우팅
export default function TabLayout() {
const colorScheme = useColorScheme();

return (
<Tabs
tabBar={(props) => <BottomTabBar {...props} />}
screenOptions={{
tabBarActiveTintColor: Colors[colorScheme ?? "light"].tint,
headerShown: false,
tabBarButton: HapticTab,
}}
>
<Tabs.Screen
name="index"
options={{
title: "홈",
tabBarIcon: ({ color }) => (
<IconSymbol size={28} name="house.fill" color={color} />
),
}}
/>
<Tabs.Screen name="index" options={{ title: "홈" }} />
<Tabs.Screen name="calendar" options={{ title: "캘린더" }} />
<Tabs.Screen name="statistics" options={{ title: "통계분석" }} />
<Tabs.Screen name="settings" options={{ title: "설정" }} />
Expand Down
170 changes: 165 additions & 5 deletions app/(tabs)/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,171 @@
import { Text } from "react-native";
import { useMemo, useState } from "react";
import { Pressable, ScrollView, Text, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { router } from "expo-router";
import { AddScheduleButton } from "@/src/components/common/AddScheduleButton";
import { ScheduleCheckItem } from "@/src/components/common/ScheduleCheckItem";

import { ScreenContainer } from "@/src/components/common";
type Schedule = {
id: string;
categoryLabel: string;
categoryColor: string;
description: string;
checked: boolean;
};

const MOCK_SCHEDULES: Schedule[] = [
{
id: "1",
categoryLabel: "CATEGORY",
categoryColor: "#5B8FD9",
description: "Lorem ipsum dolor sit amet consectetur.",
checked: false,
},
{
id: "2",
categoryLabel: "CATEGORY",
categoryColor: "#D9A05B",
description: "Lorem ipsum dolor sit amet consectetur.",
checked: false,
},
{
id: "3",
categoryLabel: "CATEGORY",
categoryColor: "#5FAE72",
description: "Lorem ipsum dolor sit amet consectetur.",
checked: false,
},
{
id: "4",
categoryLabel: "CATEGORY",
categoryColor: "#9B7ED9",
description: "Lorem ipsum dolor sit amet consectetur.",
checked: false,
},
{
id: "5",
categoryLabel: "CATEGORY",
categoryColor: "#D95B8F",
description: "Lorem ipsum dolor sit amet consectetur.",
checked: false,
},
];

function useFormattedDate() {
return useMemo(() => {
const days = ["일", "월", "화", "수", "목", "금", "토"];
const now = new Date();
return `${now.getMonth() + 1}월 ${now.getDate()}일 ${days[now.getDay()]}요일`;
}, []);
}

export default function HomeScreen() {
const insets = useSafeAreaInsets();
const dateLabel = useFormattedDate();
const [schedules, setSchedules] = useState<Schedule[]>(MOCK_SCHEDULES);
const hasSchedules = schedules.length > 0;

const toggleSchedule = (id: string) => {
setSchedules((prev) =>
prev.map((s) => (s.id === id ? { ...s, checked: !s.checked } : s))
);
};

return (
<ScreenContainer>
<Text>홈</Text>
</ScreenContainer>
<View
className="flex-1"
style={{
backgroundColor: "#F5F9F6",
paddingTop: insets.top + 20,
paddingHorizontal: 16,
}}
>
<ScrollView showsVerticalScrollIndicator={false}>
{/* 로고 영역 */}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

로고 영역으로 되어 있는 부분은 제가 별도로 헤더 컴포넌트를 구현해두었습니다! 해당 부분은 제거하고, 구현된 헤더 컴포넌트를 불러와 적용해주시면 될 것 같습니다!

<View className="mb-2 h-[32px] items-start justify-center">
<Text style={{ fontSize: 22, fontWeight: "700", color: "#4D826C" }}>
DA·LOG
</Text>
</View>

{/* 날짜 */}
<Text

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

날짜 로 되어 있는 부분에 style에 값을 직접 작성해주었는데, 사용하는 부분마다 매번 작성하는 것을 방지하기 위해 디자인 토큰으로 정의해두었습니다 ! 다음과 같이 수정해주세요

<Text className="mb-3 text-h-01 text-green-900">{dateLabel}</Text>

className="mb-3"
style={{
fontFamily: "SUIT-SemiBold",
fontWeight: "600",
fontSize: 20,
lineHeight: 30, // 20 * 150%
letterSpacing: -0.4, // 20 * -2%
color: "#15231D",
}}
>
{dateLabel}
</Text>

{/* 일정 카드 */}
<View className="w-full rounded-2xl bg-white px-4 py-4">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

배경색은 gray-0 이고, px-3으로 수정 부탁드립니다 ! 그리고 분홍색 부분을 보면 문자랑 일정 박스 부분 마지막 일정 등록하기 버튼 사이가 12px로 나타나 있어서 gap-3도 추가해주세요!

<View className="w-full gap-3 rounded-2xl bg-gray-0 px-3 py-4">

Image

<Text

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

여기도 토큰으로 스타일을 정의해 두어서 토큰으로 스타일 적용해주세요 !

<Text className="text-gray-900 text-b-02-r">

className="mb-2"
style={{
fontFamily: "SUIT-Regular",
fontWeight: "400",
fontSize: 16,
lineHeight: 24, // 16 * 150%
letterSpacing: -0.32, // 16 * -2%
color: "#020303",
}}
>
{hasSchedules
? "오늘 계획한 일정은 모두 마치셨나요?"
: "오늘 계획된 일정이 없어요."}
</Text>

{hasSchedules &&
schedules.map((s) => (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

피그마 스펙을 보면 각 박스들 마다 간격이 8px로 정의되어 있습니다. 랜더링 되는 부분을 view태그로 감싸서 간격이 생기도록 gap 추가해주세요!

<View className="gap-2">

Image

<ScheduleCheckItem
key={s.id}
categoryLabel={s.categoryLabel}
categoryColor={s.categoryColor}
description={s.description}
checked={s.checked}
onToggle={() => toggleSchedule(s.id)}
/>
))}

<View className={hasSchedules ? "mt-2" : ""}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

위에 gap-3 추가한것과 관련하여 상단에서 간격을 이미 처리했기 때문에 mt로 간격 추가한건 지워주세요

<View className={hasSchedules ? "mt-2" : ""}> // 삭제

<AddScheduleButton onPress={() => router.push("/schedule")} />
</View>
</View>

{/* 오늘의 질문 */}
<View className="mt-6">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

오늘의 질문 부분 상단 간격이 28px이라서 mt-7로 변경해주세요 !

<View className="mt-7">

Image

<Text

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

오늘의 질문 text도 토큰 정의해둔걸로 스타일 적용해주세요 ! 그리고 text와 아래 질문 받기 버튼 사이 간격이 16px이라서 mb-4로 적용해주세요

<Text className="mb-4 text-green-900 text-h-02">오늘의 질문</Text>

Image

className="mb-3"
style={{
fontFamily: "SUIT-Medium",
fontWeight: "500",
fontSize: 18,
lineHeight: 27, // 18 * 150%
letterSpacing: -0.36, // 18 * -2%
color: "#15231D",
}}
>
오늘의 질문
</Text>
<Pressable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

버튼은 공통 컴포넌트로 제작해두었습니다 ! 제 PR 확인하시면 사용하는 방법 정리해두어서 확인해주세요 ! 여기는 다음과 같이 적용해주시면 됩니다

import { Button } from "@/src/components/common/Button";
<Button label="질문 받기" />

className="w-full items-center justify-center rounded-2xl py-4"
style={{ backgroundColor: "#4D826C", outlineStyle: "none" } as any}
>
<Text
className="text-white"
style={{ fontSize: 16, fontWeight: "600" }}
>
질문 받기
</Text>
</Pressable>
Comment on lines +156 to +166

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

"질문 받기" 버튼에 onPress 핸들러가 없습니다.

새로 추가된 "오늘의 질문" 섹션의 PressableonPress가 지정되어 있지 않아, 사용자가 버튼을 눌러도 아무 동작이 일어나지 않습니다. 아직 기능이 미구현 상태라면 TODO 주석을 남기거나, 최소한 임시 핸들러(예: 콘솔 로그 또는 네비게이션 스텁)를 연결하는 것이 좋습니다.

💡 예시 수정
 <Pressable
   className="w-full items-center justify-center rounded-2xl py-4"
   style={{ backgroundColor: "`#4D826C`", outlineStyle: "none" } as any}
+  onPress={() => {
+    // TODO: 오늘의 질문 기능 연결
+  }}
 >
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Pressable
className="w-full items-center justify-center rounded-2xl py-4"
style={{ backgroundColor: "#4D826C", outlineStyle: "none" } as any}
>
<Text className="text-white" style={{ fontSize: 16, fontWeight: "600" }}>
질문 받기
</Text>
</Pressable>
<Pressable
className="w-full items-center justify-center rounded-2xl py-4"
style={{ backgroundColor: "`#4D826C`", outlineStyle: "none" } as any}
onPress={() => {
// TODO: 오늘의 질문 기능 연결
}}
>
<Text className="text-white" style={{ fontSize: 16, fontWeight: "600" }}>
질문 받기
</Text>
</Pressable>
🧰 Tools
🪛 ESLint

[error] 130-130: Replace ·className="text-white"·style={{·fontSize:·16,·fontWeight:·"600"·}} with ⏎··············className="text-white"⏎··············style={{·fontSize:·16,·fontWeight:·"600"·}}⏎············

(prettier/prettier)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/`(tabs)/index.tsx around lines 126 - 133, The "질문 받기" Pressable in the
today-question section is missing an onPress handler, so tapping it does
nothing. Add an onPress to this Pressable in index.tsx, wiring it to the
intended action (or a temporary stub such as navigation or a console/log TODO)
and keep the implementation near the existing Pressable/Text block so it’s easy
to locate even if the layout changes.

</View>
</ScrollView>
</View>
);
}
3 changes: 3 additions & 0 deletions assets/icons/box.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icons/checkbox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icons/diary.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions assets/icons/schedule.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions assets/icons/tab-calendar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icons/tab-cancle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/tab-home.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icons/tab-plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/icons/tab-setting.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions assets/icons/tab-statistic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions components/ui/icon-symbol.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ type IconSymbolName = keyof typeof MAPPING;
* - see Material Icons in the [Icons Directory](https://icons.expo.fyi).
* - see SF Symbols in the [SF Symbols](https://developer.apple.com/sf-symbols/) app.
*/
const MAPPING = {
"house.fill": "home",
} as IconMapping;
const MAPPING = {} as IconMapping;

/**
* An icon component that uses native SF Symbols on iOS, and Material Icons on Android and web.
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/AddButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function AddButton({ label, className, ...rest }: AddButtonProps) {
{...rest}
>
<PlusIcon width={16} height={16} color="#82B5A0" />
<Text className="text-b-04-m text-green-400">{label}</Text>
<Text className="text-green-400 text-b-04-m">{label}</Text>
</Pressable>
);
}
4 changes: 2 additions & 2 deletions src/components/common/AddScheduleButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export function AddScheduleButton({
)}
{...rest}
>
<Text className="text-b-03-m text-gray-800">{label}</Text>
<Text className="text-gray-800 text-b-03-m">{label}</Text>
<PlusIcon width={24} height={24} color="#2F3131" />
</Pressable>
);
}
}
Loading