Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ const AccountPage = () => {
placeholder={
errors[option.id] ? "" : REQUIRED_PREFIX[option.id]
}
className={`flex w-full bg-transparent outline-none text-14-regular text-black-90`}
className={`flex-1 w-[calc(100%-4px)] bg-transparent outline-none text-14-regular text-black-90`}
readOnly={sources[option.id] === "image"}
/>
{errors[option.id] && (
Expand Down
2 changes: 1 addition & 1 deletion apps/nowait-user/src/api/order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const getOrderDetails = async (
};

//주점 QR, 계좌번호 조회
export const getStorePayments = async (storeId: string) => {
export const getStorePayments = async (storeId: number) => {
try {
const res = await api.get<StorePaymentsResponse>(
`/v1/store-payments/${storeId}`
Expand Down
4 changes: 2 additions & 2 deletions apps/nowait-user/src/assets/icon/back.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: 3 additions & 3 deletions apps/nowait-user/src/components/BackHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ const BackHeader = ({ title }: PropsType) => {
const navigate = useNavigate()
return (
<header className="w-full fixed left-0 top-0 bg-white">
<div className="flex justify-between items-center px-5 py-2.5">
<button onClick={()=>navigate(-1)}>
<div className="flex justify-between items-center">
<button onClick={()=>navigate(-1)} className="p-2.5">
<Back />
</button>
<h1 className="text-title-16-bold">{title}</h1>
<div className="w-2.5"></div>
<div className="w-[48px] h-[48px]"></div>
</div>
</header>
);
Expand Down
6 changes: 3 additions & 3 deletions apps/nowait-user/src/components/BackOnlyHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ const BackOnlyHeader = () => {
const navigate = useNavigate();
return (
<header className="w-full fixed left-0 top-0 bg-transparent">
<div className="flex justify-between items-center px-5 py-2.5">
<button onClick={() => navigate(-1)}>
<div className="flex justify-between items-center">
<button onClick={() => navigate(-1)} className="p-2.5">
<Back />
</button>
<div className="w-2.5" />
<div className="w-[48px] h-[48px]"></div>
</div>
</header>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const RemittancePage = () => {

const { data: remittance, isLoading } = useQuery({
queryKey: ["remittance", storeId],
queryFn: () => getStorePayments(storeId!),
queryFn: () => getStorePayments(Number(storeId!)),
enabled: !!storeId,
select: (data) => data?.response,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const BookmarkListItem = ({
/>
{waitingCount !== 0 && (
<p className="absolute top-[12px] right-[12px] text-primary bg-[#ffe9df] px-2 py-[7px] font-bold text-[12px] rounded-[6px]">
{waitingCount}
대기 {waitingCount}
</p>
)}
</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,44 @@ import { useNavigate } from "react-router-dom";
import { Button } from "@repo/ui";
import Clock from "../../../../assets/icon/clock.svg?react";
import BookmarkIcon from "../../../../components/common/BookmarkIcon";
import { useState } from "react";
import { motion } from "framer-motion";
import { useBookmarkState } from "../../../../hooks/useBookmarkState";
import { useBookmarkMutation } from "../../../../hooks/mutate/useBookmark";

interface PropsType {
booth: any | undefined;
}


const BoothDetail = ({ booth }: PropsType) => {

const navigate = useNavigate();
const [isBookmarked, setIsBookmarked] = useState(false);

const { storeId, name, departmentName, waitingCount } = booth;

const { createBookmarkMutate, deleteBookmarkMutate } = useBookmarkMutation(
{
withInvalidate: true,
},
Number(storeId)
);
const { isBookmarked } = useBookmarkState(Number(storeId));

const handleBookmarkButton = async () => {
try {
if (isBookmarked) {
await deleteBookmarkMutate.mutate();
} else {
await createBookmarkMutate.mutate();
}
} catch (error) {
console.log(error);
}
};

return (
<motion.div
initial={{ opacity: 0, y: 100 }}
animate={{ opacity: 1,y: 0 }}
exit={{ opacity: 0,y: 100 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: 100 }}
transition={{ duration: 0.3, ease: "easeInOut" }}
className="fixed bottom-[30px] left-1/2 -translate-x-1/2 w-[calc(100%-32px)] bg-white rounded-[20px] z-30"
>
Expand All @@ -32,10 +51,7 @@ const BoothDetail = ({ booth }: PropsType) => {
</h1>
<h2 className="text-16-regular">{departmentName}</h2>
</div>
<button
className="mr-[5px]"
onClick={() => setIsBookmarked(!isBookmarked)}
>
<button className="mr-[5px]" onClick={handleBookmarkButton}>
<BookmarkIcon isBookmarked={isBookmarked} />
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const BoothListItem = ({
/>
{waitingCount !== 0 && (
<p className="absolute top-[12px] right-[12px] text-primary bg-[#ffe9df] px-2 py-[7px] font-bold text-[12px] rounded-[6px]">
{waitingCount}
대기 {waitingCount}
</p>
)}
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/nowait-user/src/types/order/order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export interface StorePaymentsResponse {
success: boolean;
response: {
paymentMethodId: number;
storeId: string;
storeId: number;
tossUrl?: string;
kakaoPayUrl?: string;
naverPayUrl?: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/tailwind-config/shared-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ pre {
.text-headline-24-bold {
font-size: 24px;
line-height: 136%;
letter-spacing: -0.01em;
letter-spacing: 0;
font-weight: 700;
}

Expand Down