diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..e6b7581 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,12 @@ +{ + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "semi": true, + "singleQuote": false, + "trailingComma": "es5", + "bracketSpacing": true, + "arrowParens": "always", + "endOfLine": "lf", + "plugins": ["prettier-plugin-tailwindcss"] +} diff --git a/next.config.ts b/next.config.ts index 6734ff2..ecfa0b1 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,7 +1,12 @@ /** @type {import('next').NextConfig} */ const nextConfig = { images: { - domains: ["encrypted-tbn0.gstatic.com"], + domains: [ + "encrypted-tbn0.gstatic.com", + "www.gunsan.go.kr", + "www.ktriptips.com", + "www.saemangeum.go.kr", + ], }, }; diff --git a/package-lock.json b/package-lock.json index b0def38..fe3869a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,8 @@ "@types/webpack": "^5.28.5", "eslint": "^9", "eslint-config-next": "15.3.3", + "prettier": "^3.6.2", + "prettier-plugin-tailwindcss": "^0.6.13", "tailwindcss": "^4.1.9", "typescript": "^5" } @@ -7557,6 +7559,101 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-plugin-tailwindcss": { + "version": "0.6.13", + "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.13.tgz", + "integrity": "sha512-uQ0asli1+ic8xrrSmIOaElDu0FacR4x69GynTh2oZjFY10JUt6EEumTQl5tB4fMeD6I1naKd+4rXQQ7esT2i1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.21.3" + }, + "peerDependencies": { + "@ianvs/prettier-plugin-sort-imports": "*", + "@prettier/plugin-pug": "*", + "@shopify/prettier-plugin-liquid": "*", + "@trivago/prettier-plugin-sort-imports": "*", + "@zackad/prettier-plugin-twig": "*", + "prettier": "^3.0", + "prettier-plugin-astro": "*", + "prettier-plugin-css-order": "*", + "prettier-plugin-import-sort": "*", + "prettier-plugin-jsdoc": "*", + "prettier-plugin-marko": "*", + "prettier-plugin-multiline-arrays": "*", + "prettier-plugin-organize-attributes": "*", + "prettier-plugin-organize-imports": "*", + "prettier-plugin-sort-imports": "*", + "prettier-plugin-style-order": "*", + "prettier-plugin-svelte": "*" + }, + "peerDependenciesMeta": { + "@ianvs/prettier-plugin-sort-imports": { + "optional": true + }, + "@prettier/plugin-pug": { + "optional": true + }, + "@shopify/prettier-plugin-liquid": { + "optional": true + }, + "@trivago/prettier-plugin-sort-imports": { + "optional": true + }, + "@zackad/prettier-plugin-twig": { + "optional": true + }, + "prettier-plugin-astro": { + "optional": true + }, + "prettier-plugin-css-order": { + "optional": true + }, + "prettier-plugin-import-sort": { + "optional": true + }, + "prettier-plugin-jsdoc": { + "optional": true + }, + "prettier-plugin-marko": { + "optional": true + }, + "prettier-plugin-multiline-arrays": { + "optional": true + }, + "prettier-plugin-organize-attributes": { + "optional": true + }, + "prettier-plugin-organize-imports": { + "optional": true + }, + "prettier-plugin-sort-imports": { + "optional": true + }, + "prettier-plugin-style-order": { + "optional": true + }, + "prettier-plugin-svelte": { + "optional": true + } + } + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", diff --git a/package.json b/package.json index eeb0e6a..95647b6 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,8 @@ "@types/webpack": "^5.28.5", "eslint": "^9", "eslint-config-next": "15.3.3", + "prettier": "^3.6.2", + "prettier-plugin-tailwindcss": "^0.6.13", "tailwindcss": "^4.1.9", "typescript": "^5" } diff --git a/public/file.svg b/public/file.svg deleted file mode 100644 index 004145c..0000000 --- a/public/file.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/globe.svg b/public/globe.svg deleted file mode 100644 index 567f17b..0000000 --- a/public/globe.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/next.svg b/public/next.svg deleted file mode 100644 index 5174b28..0000000 --- a/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/vercel.svg b/public/vercel.svg deleted file mode 100644 index 7705396..0000000 --- a/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/window.svg b/public/window.svg deleted file mode 100644 index b2b2a44..0000000 --- a/public/window.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/app/_components/LandingPage/index.tsx b/src/app/_components/LandingPage/index.tsx index e0e0b7a..72be1ab 100644 --- a/src/app/_components/LandingPage/index.tsx +++ b/src/app/_components/LandingPage/index.tsx @@ -1,9 +1,9 @@ "use client"; -import Logo from "@/assets/icons/logo.png"; +import { useEffect } from "react"; import { createNewUser } from "@/utils/createNewUser"; import Image from "next/image"; -import { useEffect } from "react"; +import Logo from "@/assets/icons/logo.png"; export default function LandingPage({ routing, @@ -18,14 +18,14 @@ export default function LandingPage({ }, [routing]); return ( -
-
+
+
-
-

+
+

새길에 오신 것을 환영해요!

-

+

먼저 간단한 정보부터 시작해볼까요?

diff --git a/src/app/_components/SurveyScreen/ProgressBar.jsx b/src/app/_components/SurveyScreen/ProgressBar.jsx index e7ca533..3de8aca 100644 --- a/src/app/_components/SurveyScreen/ProgressBar.jsx +++ b/src/app/_components/SurveyScreen/ProgressBar.jsx @@ -1,8 +1,8 @@ export default function ProgressBar({ progress }) { return ( -
+
diff --git a/src/app/_components/SurveyScreen/SurveyOption.tsx b/src/app/_components/SurveyScreen/SurveyOption.tsx index ade20be..f4b448c 100644 --- a/src/app/_components/SurveyScreen/SurveyOption.tsx +++ b/src/app/_components/SurveyScreen/SurveyOption.tsx @@ -1,7 +1,7 @@ import clsx from "clsx"; import Image from "next/image"; -import checkDefault from "@/assets/icons/check.png"; -import checkActive from "@/assets/icons/check_current.png"; +import checkDefault from "@/assets/icons/check_default.svg"; +import checkActive from "@/assets/icons/check_active.svg"; interface SurveyOptionProps { text: string; @@ -18,13 +18,13 @@ export default function SurveyOption({

diff --git a/src/app/_components/SurveyScreen/hooks/useSurvey.ts b/src/app/_components/SurveyScreen/hooks/useSurvey.ts index dd03636..9bfb13e 100644 --- a/src/app/_components/SurveyScreen/hooks/useSurvey.ts +++ b/src/app/_components/SurveyScreen/hooks/useSurvey.ts @@ -7,7 +7,7 @@ interface UseSurveyProps { routing?: (page: string) => void; } -export default function useSurvey({ type, routing }: UseSurveyProps) { +export function useSurvey({ type, routing }: UseSurveyProps) { const router = useRouter(); const questions = surveyData[type]; diff --git a/src/app/_components/SurveyScreen/index.tsx b/src/app/_components/SurveyScreen/index.tsx index cc8599e..8610953 100644 --- a/src/app/_components/SurveyScreen/index.tsx +++ b/src/app/_components/SurveyScreen/index.tsx @@ -1,6 +1,6 @@ "use client"; -import useSurvey from "./hooks/useSurvey"; +import { useSurvey } from "./hooks/useSurvey"; import ProgressBar from "@/app/_components/SurveyScreen/ProgressBar"; import SurveyOption from "./SurveyOption"; import Button from "@/components/Button"; @@ -22,18 +22,18 @@ export default function SurveyScreen({ type, routing }: SurveyScreenProps) { } = useSurvey({ type, routing }); return ( -

+
-
+
-

+

{questions[currentQuestion].title}

-

+

{questions[currentQuestion].contents}

-
+
{questions[currentQuestion].items.map((item, index) => ( ))}
-
+
{currentQuestion > 0 && (
+ ); +} diff --git a/src/app/recommend/_components/RecommendationPanel/SpaceCard.tsx b/src/app/recommend/_components/RecommendationPanel/SpaceCard.tsx new file mode 100644 index 0000000..9fc7bdb --- /dev/null +++ b/src/app/recommend/_components/RecommendationPanel/SpaceCard.tsx @@ -0,0 +1,57 @@ +import { RecommendationResponse } from "@/lib/type"; +import { getCity } from "@/utils/getCity"; +import { CATEGORY } from "@/constants/spaceData"; +import Image from "next/image"; +import LocationIcon from "@/assets/icons/location.svg"; +import Temp from "@/assets/icons/temp.jpg"; + +export default function SpaceCard({ + spaceData, +}: { + spaceData: RecommendationResponse; +}) { + const city = getCity(spaceData.position); + return ( +
+ +
+
+
+

+ {spaceData.title} +

+
+
+ +
+ {spaceData.position} +
+
+
+
+
+ {CATEGORY[spaceData.category]} +
+ {city && ( +
+ {city} +
+ )} +
+
+
+ ); +} diff --git a/src/app/recommend/_components/RecommendationPanel/index.tsx b/src/app/recommend/_components/RecommendationPanel/index.tsx new file mode 100644 index 0000000..47f5c67 --- /dev/null +++ b/src/app/recommend/_components/RecommendationPanel/index.tsx @@ -0,0 +1,31 @@ +import { RecommendationResponse } from "@/lib/type"; +import SpaceCard from "./SpaceCard"; + +export default function RecommendationPanel({ + spaceData, +}: { + spaceData: RecommendationResponse[]; +}) { + return ( +
+
+
+

+ 새길이 오늘 기분에 딱 맞는 +
+ 장소를 추천해드릴게요! +

+

+ 오늘은 어디로 갈지 골라볼까요? +

+
+
+
+ {spaceData.map((space, index) => ( + + ))} +
+
+
+ ); +} diff --git a/src/app/recommend/_components/BackToSurveyButton.tsx b/src/app/recommend/_components/RetrySurveyButton.tsx similarity index 51% rename from src/app/recommend/_components/BackToSurveyButton.tsx rename to src/app/recommend/_components/RetrySurveyButton.tsx index ac0eddc..58df7eb 100644 --- a/src/app/recommend/_components/BackToSurveyButton.tsx +++ b/src/app/recommend/_components/RetrySurveyButton.tsx @@ -1,7 +1,7 @@ import { useRouter } from "next/navigation"; import Button from "@/components/Button"; -export default function BackToSurveyButton() { +export default function RetrySurveyButton() { const router = useRouter(); const handleBackToSurvey = () => { @@ -10,10 +10,13 @@ export default function BackToSurveyButton() { }; return ( -
- -
+ ); } diff --git a/src/app/recommend/_components/SatisfactionModalButton.tsx b/src/app/recommend/_components/SatisfactionModalButton.tsx new file mode 100644 index 0000000..93e9a46 --- /dev/null +++ b/src/app/recommend/_components/SatisfactionModalButton.tsx @@ -0,0 +1,9 @@ +import Button from "@/components/Button"; + +export default function SatisfactionModalButton() { + return ( + + ); +} diff --git a/src/app/recommend/_components/SideBar/index.tsx b/src/app/recommend/_components/SideBar/index.tsx deleted file mode 100644 index 1271284..0000000 --- a/src/app/recommend/_components/SideBar/index.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import Image from "next/image"; -import Logo from "@/assets/icons/logo.png"; -import LogoDev from "@/assets/icons/logo_dev.png"; -import LogoKR from "@/assets/icons/logo_kr.png"; - -export default function SideBar() { - return ( -
- -
- - -
-
- ); -} diff --git a/src/app/recommend/_components/SidePanel/SpaceCard.tsx b/src/app/recommend/_components/SidePanel/SpaceCard.tsx deleted file mode 100644 index 8a43112..0000000 --- a/src/app/recommend/_components/SidePanel/SpaceCard.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import Image from "next/image"; -import Temp from "@/assets/icons/temp.jpg"; -import { RecommendationResponse } from "@/lib/type"; - -export default function SpaceCard({ - spaceData, -}: { - spaceData: RecommendationResponse; -}) { - const city = getCity(spaceData.position); - return ( -
- -
-

- {spaceData.title} -

-
- -
-
- {/* {category[spaceData.category]} */} -
- {city && ( -
- {city} -
- )} -
-
- ); -} - -function getCity(position: string) { - if (position.indexOf("군산") > -1) { - return "군산"; - } - if (position.indexOf("김제") > -1) { - return "김제"; - } - if (position.indexOf("부안") > -1) { - return "부안"; - } - return null; -} - -// const category = { -// TOUR: "여행", -// CULTURE: "문화", -// FESTIVAL: "축제", -// }; diff --git a/src/app/recommend/_components/SidePanel/index.tsx b/src/app/recommend/_components/SidePanel/index.tsx deleted file mode 100644 index c5b91fb..0000000 --- a/src/app/recommend/_components/SidePanel/index.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import SpaceCard from "./SpaceCard"; -import Image from "next/image"; -import ChevronLeft from "@/assets/icons/chevron-left.png"; -import { RecommendationResponse } from "@/lib/type"; - -export default function SidePanel({ - spaceData, -}: { - spaceData: RecommendationResponse[]; -}) { - return ( -
-
- -
-
-

- 새길이 오늘 기분에 딱 맞는 -
- 장소를 추천해드릴게요! -

-

- 오늘은 어디로 갈지 골라볼까요? 도착 시간도 함께 알려드릴게요 -

-
-
- {spaceData.map((space, index) => ( - - ))} -
-
- ); -} diff --git a/src/app/recommend/_hooks/useSurveyRecommendation.ts b/src/app/recommend/_hooks/useSurveyRecommendation.ts index 00ea439..f2887a2 100644 --- a/src/app/recommend/_hooks/useSurveyRecommendation.ts +++ b/src/app/recommend/_hooks/useSurveyRecommendation.ts @@ -1,4 +1,3 @@ -// hooks/useSurveyRecommendation.ts import { useEffect, useState } from "react"; import { fetchRecommendation } from "@/lib/apis/survey"; import { RecommendationRequest, RecommendationResponse } from "@/lib/type"; diff --git a/src/app/recommend/page.tsx b/src/app/recommend/page.tsx index a05b774..942a5b5 100644 --- a/src/app/recommend/page.tsx +++ b/src/app/recommend/page.tsx @@ -1,11 +1,12 @@ "use client"; -import SideBar from "./_components/SideBar"; -import SidePanel from "./_components/SidePanel"; -import BackToSurveyButton from "./_components/BackToSurveyButton"; +import { useSurveyRecommendation } from "./_hooks/useSurveyRecommendation"; +import RecommendationPanel from "./_components/RecommendationPanel"; import MapView from "./_components/MapView"; +import RetrySurveyButton from "./_components/RetrySurveyButton"; +import SatisfactionModalButton from "./_components/SatisfactionModalButton"; import TransitionScreen from "@/app/_components/TransitionScreen"; -import { useSurveyRecommendation } from "./_hooks/useSurveyRecommendation"; +import NavBar from "./_components/NavBar"; export default function RecommendPage() { const { spaceData, isLoading, error } = useSurveyRecommendation(); @@ -16,14 +17,21 @@ export default function RecommendPage() { if (error) return
{error}
; return ( -
+
-
- - - +
+
+ + +
+ + {/* 임시 버튼 */} +
+ + +
); diff --git a/src/assets/icons/bookmark.png b/src/assets/icons/bookmark.png deleted file mode 100644 index 5367aa4..0000000 Binary files a/src/assets/icons/bookmark.png and /dev/null differ diff --git a/src/assets/icons/bookmark_default.png b/src/assets/icons/bookmark_default.png deleted file mode 100644 index 21b01c0..0000000 Binary files a/src/assets/icons/bookmark_default.png and /dev/null differ diff --git a/src/assets/icons/bookmark_pressed.png b/src/assets/icons/bookmark_pressed.png deleted file mode 100644 index a69dab8..0000000 Binary files a/src/assets/icons/bookmark_pressed.png and /dev/null differ diff --git a/src/assets/icons/check.png b/src/assets/icons/check.png deleted file mode 100644 index 6448efc..0000000 Binary files a/src/assets/icons/check.png and /dev/null differ diff --git a/src/assets/icons/check.svg b/src/assets/icons/check.svg deleted file mode 100644 index 611e9a9..0000000 --- a/src/assets/icons/check.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/assets/icons/check_active.svg b/src/assets/icons/check_active.svg new file mode 100644 index 0000000..bcd5d64 --- /dev/null +++ b/src/assets/icons/check_active.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/check_current.png b/src/assets/icons/check_current.png deleted file mode 100644 index 428bcef..0000000 Binary files a/src/assets/icons/check_current.png and /dev/null differ diff --git a/src/assets/icons/check_default.svg b/src/assets/icons/check_default.svg new file mode 100644 index 0000000..fee1ecb --- /dev/null +++ b/src/assets/icons/check_default.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/chevron-left.png b/src/assets/icons/chevron-left.png deleted file mode 100644 index f0476b6..0000000 Binary files a/src/assets/icons/chevron-left.png and /dev/null differ diff --git a/src/assets/icons/chevron-right.png b/src/assets/icons/chevron-right.png deleted file mode 100644 index 4d1b27d..0000000 Binary files a/src/assets/icons/chevron-right.png and /dev/null differ diff --git a/src/assets/icons/location.svg b/src/assets/icons/location.svg new file mode 100644 index 0000000..29f9c97 --- /dev/null +++ b/src/assets/icons/location.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/assets/icons/logo.png b/src/assets/icons/logo.png index 829b958..efc8295 100644 Binary files a/src/assets/icons/logo.png and b/src/assets/icons/logo.png differ diff --git a/src/assets/icons/logo_dev.png b/src/assets/icons/logo_dev.png index b7f7087..a9eb4e9 100644 Binary files a/src/assets/icons/logo_dev.png and b/src/assets/icons/logo_dev.png differ diff --git a/src/assets/icons/logo_kr.png b/src/assets/icons/logo_kr.png index 728f8f3..a7f1e48 100644 Binary files a/src/assets/icons/logo_kr.png and b/src/assets/icons/logo_kr.png differ diff --git a/src/assets/icons/map_pin.png b/src/assets/icons/map_pin.png deleted file mode 100644 index 85bea79..0000000 Binary files a/src/assets/icons/map_pin.png and /dev/null differ diff --git a/src/assets/icons/pin.png b/src/assets/icons/pin.png deleted file mode 100644 index 530060f..0000000 Binary files a/src/assets/icons/pin.png and /dev/null differ diff --git a/src/assets/icons/sliders.png b/src/assets/icons/sliders.png deleted file mode 100644 index 5a739b8..0000000 Binary files a/src/assets/icons/sliders.png and /dev/null differ diff --git a/src/components/Button/index.tsx b/src/components/Button/index.tsx index 6f23c68..2971b15 100644 --- a/src/components/Button/index.tsx +++ b/src/components/Button/index.tsx @@ -5,6 +5,7 @@ import clsx from "clsx"; interface ButtonProps { variant: "primary" | "secondary"; + style?: "filled" | "outlined"; width?: number; onClick?: () => void; disabled?: boolean; @@ -13,6 +14,7 @@ interface ButtonProps { export default function Button({ variant = "primary", + style = "filled", width = 120, onClick, disabled = false, @@ -21,11 +23,12 @@ export default function Button({ return (