+
메뉴
- {dummyData.map((data: MenuType) => {
- return ;
+ {data?.map((data: MenuType) => {
+ return ;
})}
diff --git a/apps/nowait-user/src/components/customSwiper.css b/apps/nowait-user/src/components/customSwiper.css
new file mode 100644
index 00000000..a678f350
--- /dev/null
+++ b/apps/nowait-user/src/components/customSwiper.css
@@ -0,0 +1,30 @@
+.swiper-wrap {
+ margin: 0px -20px;
+ height: 256px;
+}
+.swiper {
+ width: 100%;
+ height: 100%;
+}
+.swiper-slide {
+ width: 100%;
+ height: 100%;
+}
+.swiper-slide img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+}
+.swiper-pagination-bullet-active {
+ width: 6px;
+ height: 6px;
+ margin: 0px 2px !important;
+
+ background-color: white;
+}
+.swiper-pagination-bullet {
+ width: 6px;
+ height: 6px;
+ margin: 0px 2px !important;
+ background-color: rgb(255, 255, 255);
+}
diff --git a/apps/nowait-user/src/hooks/useBookmarkState.ts b/apps/nowait-user/src/hooks/useBookmarkState.ts
index e27da90f..29a9f0dd 100644
--- a/apps/nowait-user/src/hooks/useBookmarkState.ts
+++ b/apps/nowait-user/src/hooks/useBookmarkState.ts
@@ -3,27 +3,41 @@ import { useParams } from "react-router-dom";
import { getBookmark } from "../api/reservation";
interface BookmarkType {
- bookmarkId: string;
- userId: string;
+ // bookmarkId: string;
+ // userId: string;
storeId: string;
+ waitingCount: number;
+ departmentId: number;
+ departmentName: string;
+ name: string;
+ location: string;
+ description: string;
+ profileImage: string | null;
+ bannerImages: string[];
+ isActive: boolean;
+ deleted: boolean;
+ createdAt: string;
}
export const useBookmarkState = (storeId?: string) => {
const { id: paramId } = useParams();
- console.log(paramId)
+ console.log(paramId);
const id = storeId ?? paramId;
-
+ console.log(id)
const { data, isLoading } = useQuery({
- queryKey: ["bookmark", id],
+ queryKey: ["bookmark"],
queryFn: getBookmark,
- select: (data) =>
- data.response.find(
- (bookmark: BookmarkType) => String(bookmark.storeId) === id
- ),
+ select : (data) => data.response
+ // select: (data) =>
+ // data.response.find(
+ // (bookmark: BookmarkType) => String(bookmark.storeId) === id
+ // ),
});
- console.log(data)
+ const isBookmarked = data?.response?.find(
+ (bookmark: BookmarkType) => String(bookmark.storeId) === id
+ )
return {
- isBookmarked: data !== undefined,
+ isBookmarked: isBookmarked !== undefined,
bookmarkData: data,
isLoading,
};
diff --git a/apps/nowait-user/src/hooks/useTransitionSelect.ts b/apps/nowait-user/src/hooks/useTransitionSelect.ts
new file mode 100644
index 00000000..3b3a25e9
--- /dev/null
+++ b/apps/nowait-user/src/hooks/useTransitionSelect.ts
@@ -0,0 +1,32 @@
+import { useLocation } from "react-router-dom";
+
+export const useTransitionSelect = () => {
+ const location = useLocation();
+ const previousPath = sessionStorage.getItem('path');
+
+ const previousPage = previousPath || '';
+ const currentPage = location.pathname;
+
+ sessionStorage.setItem('path', location.pathname);
+
+ if (currentPage === 'passwordPage') {
+ return '';
+ }
+ if (currentPage === 'spaceListPage') {
+ if (previousPage === 'passwordPage') return '';
+ return 'slide-left';
+ }
+ if (currentPage === 'jobListPage') {
+ if (previousPage === 'spaceListPage') {
+ return 'slide-right';
+ }
+ if (previousPage === 'taskListPage') {
+ return 'left';
+ }
+ }
+ if (currentPage === 'taskListPage') {
+ return 'right';
+ }
+
+ return '';
+};
\ No newline at end of file
diff --git a/apps/nowait-user/src/pages/order/home/StorePage.tsx b/apps/nowait-user/src/pages/order/home/StorePage.tsx
index 21aef2aa..e01ab77c 100644
--- a/apps/nowait-user/src/pages/order/home/StorePage.tsx
+++ b/apps/nowait-user/src/pages/order/home/StorePage.tsx
@@ -31,7 +31,7 @@ const StorePage = () => {
-
+
{cart && cart.length > 0 && (
diff --git a/apps/nowait-user/src/pages/waiting/bookmark/BookmarkPage.tsx b/apps/nowait-user/src/pages/waiting/bookmark/BookmarkPage.tsx
index b2a1922b..835d5b2e 100644
--- a/apps/nowait-user/src/pages/waiting/bookmark/BookmarkPage.tsx
+++ b/apps/nowait-user/src/pages/waiting/bookmark/BookmarkPage.tsx
@@ -1,26 +1,28 @@
import HomeHeader from "../../../components/Header";
+import { useBookmarkState } from "../../../hooks/useBookmarkState";
import BookmarkedStoreItem from "./components/BookmarkedStoreItem";
const dummyData = [
{
id: 1,
image: "/bookmarkStoreImage.png",
- wait: "대기 0팀",
+ waitingCount: "대기 0팀",
storeName: "스페이시스",
- lesson: "바이오메카트로닉스공학과",
+ departmentName: "바이오메카트로닉스공학과",
storeId: "1",
},
{
- id: 1,
+ id: 2,
image: "/bookmarkStoreImage.png",
- wait: "대기 0팀",
+ waitingCount: "대기 0팀",
storeName: "스페이시스",
- lesson: "약과",
+ departmentName: "약과",
storeId: "2",
},
];
const BookmarkPage = () => {
+ const {bookmarkData} = useBookmarkState()
return (
@@ -29,15 +31,15 @@ const BookmarkPage = () => {
북마크한 부스
@@ -54,7 +54,7 @@ const BookmarkedStoreItem = ({
>
{storeName}
- {lesson}
+ {departmentName}