diff --git a/apps/nowait-admin/index.html b/apps/nowait-admin/index.html index 0f63c193..305a1ca2 100644 --- a/apps/nowait-admin/index.html +++ b/apps/nowait-admin/index.html @@ -1,7 +1,8 @@ - + + NOWAIT Admin @@ -11,3 +12,4 @@ + diff --git a/apps/nowait-admin/public/fonts/pretendard/PretendardVariable.woff2 b/apps/nowait-admin/public/fonts/pretendard/PretendardVariable.woff2 new file mode 100644 index 00000000..49c54b51 Binary files /dev/null and b/apps/nowait-admin/public/fonts/pretendard/PretendardVariable.woff2 differ diff --git a/apps/nowait-admin/public/fonts/pretendard/pretendardvariable.css b/apps/nowait-admin/public/fonts/pretendard/pretendardvariable.css new file mode 100644 index 00000000..4271ac89 --- /dev/null +++ b/apps/nowait-admin/public/fonts/pretendard/pretendardvariable.css @@ -0,0 +1,15 @@ +@font-face { + font-family: "Pretendard Variable"; + font-weight: 100 900; + font-style: normal; + font-display: swap; + src: url("../pretendard/PretendardVariable.woff2") format("woff2"); +} + +/* @font-face { + font-family: "Pretendard Variable"; + font-weight: 100 900; + font-style: italic; + font-display: swap; + src: url("/fonts/pretendard/PretendardVariable-Italic.woff2") format("woff2"); +} */ \ No newline at end of file diff --git a/apps/nowait-admin/src/pages/AdminOrders/AdminOrders.tsx b/apps/nowait-admin/src/pages/AdminOrders/AdminOrders.tsx index b5fab7ed..b5d31464 100644 --- a/apps/nowait-admin/src/pages/AdminOrders/AdminOrders.tsx +++ b/apps/nowait-admin/src/pages/AdminOrders/AdminOrders.tsx @@ -1,4 +1,4 @@ -import { useState, useRef, useEffect } from "react"; +import { useState, useRef, useEffect, useMemo } from "react"; import { useLocation, useNavigate, useParams } from "react-router"; import { PaymentCard, CookCard, CookedCard } from "./OrderCard"; import { DetailCard } from "./DetailCard"; @@ -67,11 +67,19 @@ const AdminOrders = () => { }; // 상태별 데이터 필터링 - const paymentWaitingData = orders.filter( - (order) => order.status === "WAITING_FOR_PAYMENT" - ); - const cookingData = orders.filter((order) => order.status === "COOKING"); - const cookedData = orders.filter((order) => order.status === "COOKED"); + const { paymentWaitingData, cookingData, cookedData } = useMemo(() => { + const waiting: Order[] = []; + const cooking: Order[] = []; + const cooked: Order[] = []; + + orders.forEach((order) => { + if (order.status === "WAITING_FOR_PAYMENT") waiting.push(order); + else if (order.status === "COOKING") cooking.push(order); + else if (order.status === "COOKED") cooked.push(order); + }); + + return { paymentWaitingData: waiting, cookingData: cooking, cookedData: cooked }; + }, [orders]); // 새로고침 핸들러 const handleRefresh = () => { diff --git a/apps/nowait-user/index.html b/apps/nowait-user/index.html index e4503e0e..d2e2d404 100644 --- a/apps/nowait-user/index.html +++ b/apps/nowait-user/index.html @@ -1,7 +1,8 @@ - + + NOWAIT @@ -16,3 +17,4 @@ > + diff --git a/apps/nowait-user/public/fonts/pretendard/PretendardVariable.woff2 b/apps/nowait-user/public/fonts/pretendard/PretendardVariable.woff2 new file mode 100644 index 00000000..49c54b51 Binary files /dev/null and b/apps/nowait-user/public/fonts/pretendard/PretendardVariable.woff2 differ diff --git a/apps/nowait-user/public/fonts/pretendard/pretendardvariable.css b/apps/nowait-user/public/fonts/pretendard/pretendardvariable.css new file mode 100644 index 00000000..4271ac89 --- /dev/null +++ b/apps/nowait-user/public/fonts/pretendard/pretendardvariable.css @@ -0,0 +1,15 @@ +@font-face { + font-family: "Pretendard Variable"; + font-weight: 100 900; + font-style: normal; + font-display: swap; + src: url("../pretendard/PretendardVariable.woff2") format("woff2"); +} + +/* @font-face { + font-family: "Pretendard Variable"; + font-weight: 100 900; + font-style: italic; + font-display: swap; + src: url("/fonts/pretendard/PretendardVariable-Italic.woff2") format("woff2"); +} */ \ No newline at end of file diff --git a/apps/nowait-user/src/api/menu.ts b/apps/nowait-user/src/api/menu.ts index b553e5ce..e8e7e0f9 100644 --- a/apps/nowait-user/src/api/menu.ts +++ b/apps/nowait-user/src/api/menu.ts @@ -21,7 +21,7 @@ interface MenuServerResponse { export const getStoreMenus = async (publicCode: string) => { try { const res = await UserApi.get( - `/stores/${publicCode}/menus` + `/v1/stores/${publicCode}/menus` ); if (res?.data.success) return res.data; } catch (error) { @@ -34,6 +34,6 @@ export const getStoreMenu = async ( publicCode: string, menuId: number ): Promise => { - const res = await UserApi.get(`/stores/${publicCode}/menus/${menuId}`); + const res = await UserApi.get(`/v1/stores/${publicCode}/menus/${menuId}`); return res.data; }; diff --git a/apps/nowait-user/src/api/order.ts b/apps/nowait-user/src/api/order.ts index 4607387e..dee4058e 100644 --- a/apps/nowait-user/src/api/order.ts +++ b/apps/nowait-user/src/api/order.ts @@ -13,7 +13,7 @@ export const createOrder = async ( payload: OrderType ): Promise => { const res = await UserApi.post( - `/stores/${publicCode}/tables/${tableId}/orders`, + `/v1/stores/${publicCode}/tables/${tableId}/orders`, payload ); return res.data; @@ -24,7 +24,7 @@ export const getOrderDetails = async ( publicCode: string, tableId: number ): Promise => { - const res = await UserApi.get(`/stores/${publicCode}/tables/${tableId}/orders`); + const res = await UserApi.get(`/v1/stores/${publicCode}/tables/${tableId}/orders`); return res.data; }; @@ -32,7 +32,7 @@ export const getOrderDetails = async ( export const getStorePayments = async (publicCode: string) => { try { const res = await UserApi.get( - `/stores/${publicCode}/payments` + `/v1/stores/${publicCode}/payments` ); return res.data; } catch (error) { diff --git a/apps/nowait-user/src/api/reservation.ts b/apps/nowait-user/src/api/reservation.ts index bcaa5a6a..67e81e99 100644 --- a/apps/nowait-user/src/api/reservation.ts +++ b/apps/nowait-user/src/api/reservation.ts @@ -14,7 +14,7 @@ interface ServerResponse { // 모든 주점 정보 가져오기 export const getAllStores = async () => { - const response = await UserApi.get("/stores", { + const response = await UserApi.get("/v1/stores", { params: { page: 0, size: 50, @@ -27,7 +27,7 @@ export const getAllStores = async () => { export const getInfiniteAllStores = async ( pageParam: number ): Promise<{ storePageReadResponses: StoreType[]; hasNext: boolean }> => { - const response = await UserApi.get("/stores", { + const response = await UserApi.get("/v1/stores", { params: { page: pageParam, size: 5, @@ -39,7 +39,7 @@ export const getInfiniteAllStores = async ( // 주점 상세 정보 가져오기 export const getStore = async (publicCode: string) => { try { - const res = await UserApi.get(`/stores/${publicCode}`); + const res = await UserApi.get(`/v1/stores/${publicCode}`); return res.data; } catch (error) { console.log(error); @@ -51,18 +51,18 @@ export const createReservation = async ( storeId: number, payload: { partySize: number } ) => { - const res = await UserApi.post(`/users/me/waitings/${storeId}`, payload); + const res = await UserApi.post(`/v1/users/me/waitings/${storeId}`, payload); return res.data; }; export const getMyReservations = async () => { - const res = await UserApi.get("/users/me/waitings"); + const res = await UserApi.get("/v1/users/me/waitings"); return res.data; }; // 북마크 조회 export const getBookmark = async (): Promise => { - const res = await UserApi.get("/users/me/bookmarks"); + const res = await UserApi.get("/v1/users/me/bookmarks"); return res.data; }; @@ -71,7 +71,7 @@ export const createBookmark = async ( storeId: number | undefined, signal: AbortSignal ) => { - await UserApi.post(`/users/me/bookmarks/${storeId}`, null, { signal }); + await UserApi.post(`/v1/users/me/bookmarks/${storeId}`, null, { signal }); }; // 북마크 삭제 @@ -79,7 +79,7 @@ export const deleteBookmark = async ( storeId: number | undefined, signal: AbortSignal ) => { - const res = await UserApi.delete(`/users/me/bookmarks/${storeId}`, { + const res = await UserApi.delete(`/v1/users/me/bookmarks/${storeId}`, { signal, }); return res.data; diff --git a/apps/nowait-user/src/pages/waiting/boothMap/hooks/useBooths.ts b/apps/nowait-user/src/pages/waiting/boothMap/hooks/useBooths.ts index 311a30e3..e9c96596 100644 --- a/apps/nowait-user/src/pages/waiting/boothMap/hooks/useBooths.ts +++ b/apps/nowait-user/src/pages/waiting/boothMap/hooks/useBooths.ts @@ -8,7 +8,9 @@ export const useBooths = () => { queryKey: ["storesMarkers"], queryFn: getAllStores, select: (data) => data?.response?.storePageReadResponses, - staleTime: 1000 * 60, + staleTime: 1000 * 60 * 5, // 5분 + gcTime: 1000 * 60 * 10, // 10분 + refetchOnWindowFocus: false, }); // 부스 + 마커 좌표 diff --git a/packages/tailwind-config/shared-styles.css b/packages/tailwind-config/shared-styles.css index aaeedc8d..be932acf 100644 --- a/packages/tailwind-config/shared-styles.css +++ b/packages/tailwind-config/shared-styles.css @@ -1,8 +1,8 @@ -/* ===== 폰트 Import ===== */ -@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable.css"); +/* ===== 폰트 로컬 Import ===== */ +@import url("/fonts/pretendard/pretendardvariable.css"); @import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@100;200;300;400;500;600;700;800;900&display=swap"); -/* ===== 공통 CSS 변수 ===== */ +/* ===== 공통 css 변수 ===== */ :root { /* Primary Color */ --primary: #ff4103; @@ -50,7 +50,7 @@ /* White */ --white-100: #ffffff; - /* 상태 색상 */ + /* ?곹깭 ?됱긽 */ --success: #27ae60; --warning: #f2994a; --error: #eb5757; @@ -93,7 +93,7 @@ --layout-mobile-gutter: 12px; } -/* ===== 폰트 패밀리 적용 ===== */ +/* ===== ?고듃 ?⑤?由??곸슜 ===== */ * { font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", @@ -127,7 +127,7 @@ pre { "Liberation Mono", "Courier New", monospace; } -/* ===== 모바일 폰트 사이즈 유틸리티 ===== */ +/* ===== 紐⑤컮???고듃 ?ъ씠利??좏떥由ы떚 ===== */ @layer utilities { /* Headline */ .text-headline-28-bold { @@ -157,7 +157,7 @@ pre { letter-spacing: -0.01em; font-weight: 700; } - /* 웨이팅 카드 테이블 번호 */ + /* ?⑥씠??移대뱶 ?뚯씠釉?踰덊샇 */ .text-20-bold { font-size: 20px; line-height: 136%; @@ -208,7 +208,7 @@ pre { } /* Text */ - /* 웨이팅 카드 인원수 */ + /* ?⑥씠??移대뱶 ?몄썝??*/ .text-17-bold { font-size: 17px; line-height: 136%; @@ -342,14 +342,14 @@ pre { font-weight: 600; } - /* 미리보기 학과명 폰트 */ + /* 誘몃━蹂닿린 ?숆낵紐??고듃 */ .text-major { font-size: 8.81px; line-height: 144%; letter-spacing: -1%; font-weight: 400; } - /* 부스명 */ + /* 遺€?ㅻ챸 */ .text-boothname { font-size: 13.85px; line-height: 136%; @@ -357,14 +357,14 @@ pre { font-weight: 700; } - /* 부스 위치 */ + /* 遺€???꾩튂 */ .text-location { font-size: 10.07px; line-height: 144%; letter-spacing: -1%; font-weight: 400; } - /* 미리보기 빨간 뱃지 폰트 */ + /* 誘몃━蹂닿린 鍮④컙 諭껋? ?고듃 */ .text-8-bold { font-size: 8px; line-height: 100%; @@ -393,7 +393,7 @@ pre { font-weight: 700; } - /* 미리보기 하단 "공지" 폰트 */ + /* 誘몃━蹂닿린 ?섎떒 "怨듭?" ?고듃 */ .text-notice { font-size: 9px; line-height: 144%; @@ -408,7 +408,7 @@ pre { font-weight: 500; } - /* 이용약관 폰트 */ + /* ?댁슜?쎄? ?고듃 */ .term-text-13-semibold { font-size: 13px; line-height: 160%; @@ -425,15 +425,15 @@ pre { color: var(--black-70); } - /* Work Sans 폰트 유틸리티 */ + /* Work Sans ?고듃 ?좏떥由ы떚 */ .font-work-sans { font-family: "Work Sans", sans-serif; } } -/* ===== 공통 컴포넌트 클래스 ===== */ +/* ===== 怨듯넻 而댄룷?뚰듃 ?대옒??===== */ @layer components { - /* 브랜드 버튼 */ + /* 釉뚮옖??踰꾪듉 */ .btn-brand { @apply px-6 py-3 rounded-xl font-semibold transition-all duration-300; background: var(--brand-primary); @@ -446,7 +446,7 @@ pre { box-shadow: var(--shadow-medium); } - /* 카드 스타일 */ + /* 移대뱶 ?ㅽ???*/ .card-base { @apply rounded-2xl backdrop-blur-sm transition-all duration-300; box-shadow: var(--shadow-soft); @@ -457,7 +457,7 @@ pre { transform: translateY(-4px); } - /* 그라디언트 배경 */ + /* 洹몃씪?붿뼵??諛곌꼍 */ .bg-gradient-purple-blue { background: var(--gradient-purple-blue); } @@ -470,14 +470,14 @@ pre { background: var(--gradient-sunset); } - /* 텍스트 그라디언트 */ + /* ?띿뒪??洹몃씪?붿뼵??*/ .text-gradient-purple { background: linear-gradient(135deg, var(--purple-600), var(--blue-600)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } - /* Primary 색상 유틸리티 */ + /* Primary ?됱긽 ?좏떥由ы떚 */ .text-primary { color: var(--primary); } @@ -485,7 +485,7 @@ pre { background-color: var(--primary); } - /* Black 색상 유틸리티 */ + /* Black ?됱긽 ?좏떥由ы떚 */ .text-black-100 { color: var(--black-100); } @@ -596,7 +596,7 @@ pre { background-color: var(--black-5); } - /* Navy 색상 유틸리티 */ + /* Navy ?됱긽 ?좏떥由ы떚 */ .text-navy-100 { color: var(--navy-100); } @@ -731,7 +731,7 @@ pre { border-color: var(--black-20); } - /* White 색상 유틸리티 */ + /* White ?됱긽 ?좏떥由ы떚 */ .text-white-100 { color: var(--white-100); } @@ -739,7 +739,7 @@ pre { background-color: var(--white-100); } - /* 상태 색상 유틸리티 */ + /* ?곹깭 ?됱긽 ?좏떥由ы떚 */ .text-success { color: var(--success); } @@ -760,7 +760,7 @@ pre { background-color: var(--error); } - /* Sub Color 유틸리티 */ + /* Sub Color ?좏떥由ы떚 */ .text-purple { color: var(--purple); } @@ -805,7 +805,7 @@ pre { background-color: var(--gray); } - /* Icon Size 유틸리티 */ + /* Icon Size ?좏떥由ы떚 */ .icon-xs { width: var(--icon-xs); height: var(--icon-xs); @@ -827,7 +827,7 @@ pre { height: var(--icon-xl); } - /* Layout 컨테이너 유틸리티 */ + /* Layout 而⑦뀒?대꼫 ?좏떥由ы떚 */ .container-pc { max-width: 1920px; margin: 0 auto; @@ -863,7 +863,7 @@ pre { padding-right: var(--layout-mobile-margin); } - /* 반응형 컨테이너 */ + /* 諛섏쓳??而⑦뀒?대꼫 */ .container-responsive { max-width: 1920px; margin: 0 auto; @@ -899,7 +899,7 @@ pre { } } - /* Grid Gutter 유틸리티 */ + /* Grid Gutter ?좏떥由ы떚 */ .grid-gutter-pc { gap: var(--layout-pc-gutter); } @@ -920,7 +920,7 @@ pre { gap: var(--layout-mobile-gutter); } - /* 반응형 Grid Gutter */ + /* 諛섏쓳??Grid Gutter */ .grid-gutter-responsive { gap: var(--layout-mobile-gutter); } @@ -950,7 +950,7 @@ pre { } } -/* ===== 애니메이션 ===== */ +/* ===== ?좊땲硫붿씠??===== */ @layer utilities { .animate-fade-in { animation: fadeIn 0.5s ease-in-out; @@ -1021,3 +1021,4 @@ pre { box-shadow: 0 0 30px rgba(167, 139, 250, 0.6); } } + diff --git a/vercel.json b/vercel.json index b050abc5..6f353c97 100644 --- a/vercel.json +++ b/vercel.json @@ -1,4 +1,24 @@ { + "headers": [ + { + "source": "/admin/fonts/pretendard/:path*", + "headers": [ + { + "key": "Cache-Control", + "value": "public, max-age=31536000, immutable" + } + ] + }, + { + "source": "/user/fonts/pretendard/:path*", + "headers": [ + { + "key": "Cache-Control", + "value": "public, max-age=31536000, immutable" + } + ] + } + ], "rewrites": [ { "source": "/admin/(.*)", "destination": "/apps/nowait-admin/$1" }, { "source": "/user/(.*)", "destination": "/apps/nowait-user/$1" }