diff --git a/src/api/core.ts b/src/api/core.ts
index 1edc787..5f561cf 100644
--- a/src/api/core.ts
+++ b/src/api/core.ts
@@ -11,7 +11,7 @@ import { ACCESS_TOKEN, HTTP_METHODS } from '@/constants'
import { BaseResponse } from './types'
const axiosInstance: AxiosInstance = axios.create({
- baseURL: '/v1',
+ baseURL: process.env.NEXT_PUBLIC_API_URL,
timeout: 10000,
headers: { 'Content-Type': 'application/json' },
withCredentials: true,
diff --git a/src/app/auth/callback/page.tsx b/src/app/auth/callback/page.tsx
index fb5137c..1cf36de 100644
--- a/src/app/auth/callback/page.tsx
+++ b/src/app/auth/callback/page.tsx
@@ -43,6 +43,7 @@ function LoginCheck() {
const data = await res.json()
Cookies.set('accessToken', data.data.accessToken)
+ Cookies.set('role', data.data.userInfo.role)
setUserInfo({
...data.data.userInfo,
profileImage:
diff --git a/src/app/home/components/TimeCard.tsx b/src/app/home/components/TimeCard.tsx
index 8af6d99..1750037 100644
--- a/src/app/home/components/TimeCard.tsx
+++ b/src/app/home/components/TimeCard.tsx
@@ -1,17 +1,31 @@
import { categoryLabels } from '@/app/archive/api/types'
-import { Badge, Cup, Div } from '@/components'
+import { Badge, Div } from '@/components'
+import Image from 'next/image'
interface TimeCardProps {
time: number
category: string
title: string
+ imgSrc: string
}
-export default function TimeCard({ time, category, title }: TimeCardProps) {
+export default function TimeCard({
+ time,
+ category,
+ title,
+ imgSrc,
+}: TimeCardProps) {
+ console.log(category, 'category')
return (
-
+
+{time}분
diff --git a/src/app/home/components/TimePiece.tsx b/src/app/home/components/TimePiece.tsx
index 5e695ab..cd6647f 100644
--- a/src/app/home/components/TimePiece.tsx
+++ b/src/app/home/components/TimePiece.tsx
@@ -1,4 +1,3 @@
-import { transKeyword } from '@/app/archive/components/Treemap/Treemap'
import TimeCard from './TimeCard'
import { useHomeContext } from '../fast/components/Fetcher'
@@ -12,7 +11,8 @@ export default function TimePiece() {
key={id}
time={savedTime}
title={title}
- category={transKeyword(keyword.category)}
+ category={keyword.category}
+ imgSrc={keyword.image}
/>
))}
diff --git a/src/app/mypage/page.tsx b/src/app/mypage/page.tsx
index 4f5a85e..e24913c 100644
--- a/src/app/mypage/page.tsx
+++ b/src/app/mypage/page.tsx
@@ -93,7 +93,7 @@ export default function MyPage() {
className="px-20 py-16"
onClick={() => {
deleteUserInfo()
- Cookies.remove('accesstoken')
+ Cookies.remove('accessToken')
push('/')
}}
>
diff --git a/src/app/start/api/api.ts b/src/app/start/api/api.ts
index f4950ed..07e6c9a 100644
--- a/src/app/start/api/api.ts
+++ b/src/app/start/api/api.ts
@@ -1,3 +1,4 @@
+import Cookies from 'js-cookie'
import { http } from '@/api'
import useUserInfo, { UserInfo } from '@/store/useUserInfo'
import { useMutation, useSuspenseQuery } from '@tanstack/react-query'
@@ -24,6 +25,7 @@ export const usePostOnboard = () => {
onSuccess: ({ data }) => {
const updatedUserInfo = { ...data, role: 'MEMBER' as const }
setUserInfo(updatedUserInfo)
+ Cookies.set('role', 'MEMBER')
router.push('/home')
},
onError: (error) => {
diff --git a/src/app/start/components/Step3.tsx b/src/app/start/components/Step3.tsx
index fb59140..4a739c5 100644
--- a/src/app/start/components/Step3.tsx
+++ b/src/app/start/components/Step3.tsx
@@ -8,7 +8,7 @@ export default function Step3() {
useProfileSelector()
return (
-
+
어떤 프로필로 함께 하시겠어요?
프로필은 나중에 바꿀 수 있어요
diff --git a/src/app/start/components/Step4.tsx b/src/app/start/components/Step4.tsx
index 2c52326..64e219b 100644
--- a/src/app/start/components/Step4.tsx
+++ b/src/app/start/components/Step4.tsx
@@ -6,10 +6,6 @@ import Image from 'next/image'
export default function Step4() {
const { userInfo } = useUserInfo()
- if (!userInfo.nickname) {
- return
loading...
- }
-
return (
diff --git a/src/app/start/page.tsx b/src/app/start/page.tsx
index 2d2d170..f54bfe7 100644
--- a/src/app/start/page.tsx
+++ b/src/app/start/page.tsx
@@ -73,7 +73,7 @@ export default function Start() {
-