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
4 changes: 2 additions & 2 deletions apps/nowait-user/src/api/order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const createOrder = async (
payload: OrderType
): Promise<CreateOrderServerResponse> => {
const res = await api.post(
`${API_URI}/orders/create/${publicCode}/${tableId}`,
`/orders/create/${publicCode}/${tableId}`,
payload
);
return res.data;
Expand All @@ -31,7 +31,7 @@ export const getOrderDetails = async (
publicCode: string,
tableId: number
): Promise<OrderDetailsServerResponse> => {
const res = await api.get(`${API_URI}/orders/items/${publicCode}/${tableId}`);
const res = await api.get(`/orders/items/${publicCode}/${tableId}`);
return res.data;
};

Expand Down
2 changes: 1 addition & 1 deletion apps/nowait-user/src/components/EmptyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const EmptyPage = ({ mode, title, buttonText }: PropsType) => {
<div>
<BackOnlyHeader />
<div
className={`min-h-screen flex flex-col justify-center items-center ${
className={`min-h-dvh flex flex-col justify-center items-center ${
mode === "default" ? "bg-white" : "bg-black-15"
}`}
>
Expand Down
2 changes: 1 addition & 1 deletion apps/nowait-user/src/components/order/PageFooterButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const PageFooterButton = ({
<footer
className={`fixed bottom-0 w-full max-w-[430px] min-w-[320px] ${backgroundClass}`}
>
<div className={`${className} flex justify-center pt-8 pb-5 px-5`}>
<div className={`${className} flex justify-center pt-8 pb-6 px-5`}>
{children}
</div>
</footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,21 @@ type OrderStatus = keyof typeof statusMap;
const OrderDetailsPage = () => {
const { storeId } = useParams();
const tableId = localStorage.getItem("tableId");

function getCookie(cookieName:string) {
cookieName = cookieName + '=';
let cookieData = document.cookie;
let start = cookieData.indexOf(cookieName);
let cookieValue = '';
if (start != -1) {
start += cookieName.length;
let end = cookieData.indexOf(';', start);
if (end == -1) end = cookieData.length;
cookieValue = cookieData.substring(start, end);
}

return decodeURIComponent(cookieValue);
}
console.log(getCookie("JSESSIONID"))
const { data: orderDetails, isLoading } = useQuery({
queryKey: ["orderDetails", storeId],
queryFn: () => getOrderDetails(storeId!, Number(tableId!)),
Expand Down
8 changes: 8 additions & 0 deletions apps/nowait-user/vercel.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"rewrites": [
{
"source": "/orders/:path*",
"destination": "https://nowait.co.kr/orders/:path*"
},
{
"source": "/v1/:path*",
"destination": "https://nowait.co.kr/v1/:path*"
},
{
"source": "/api/images/:path*",
"destination": "https://gtablestoreimage-resize-bucket.s3.ap-northeast-2.amazonaws.com/:path*"
Expand Down