Skip to content

Commit

Permalink
Fix: 안쓰는 코드 주석
Browse files Browse the repository at this point in the history
  • Loading branch information
marina-yhm committed Nov 24, 2023
1 parent 63b53cd commit 4bc7d38
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 39 deletions.
8 changes: 4 additions & 4 deletions src/hoc/auth.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { useCookies } from "react-cookie";
/*import { useCookies } from "react-cookie";
import { useLocation, useNavigate } from "react-router-dom";
import { useRecoilValue, useSetRecoilState } from "recoil";
import { getUserSelector, loginState } from "../Atom/status";
import { getUserSelector, loginState } from "../Atom/status";*/

function Auth(SpecificComponent, option) {
function AuthenticationCheck(props) {
const navigate = useNavigate();
/*const navigate = useNavigate();
const location = useLocation();
const userInfo = useRecoilValue(getUserSelector);
const setIsLoggedIn = useSetRecoilState(loginState);
const [cookies] = useCookies(["accessToken"]);
/*
useEffect(() => {
const isAuth = window.localStorage.getItem("isAuthenticated");
if (userInfo === "404" && location.pathname !== "/") {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Home/Receipt/Receipt.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import PendingReceipt from "./StatusReceipt/PendingReceipt";
import ProgressReceipt from "./StatusReceipt/ProgressReceipt";

const Receipt = () => {
const [Status, setStatus] = useRecoilState(selectStatus);
const [Order, setOrder] = useRecoilState(selectOrder);
const Status = useRecoilState(selectStatus);
const Order = useRecoilState(selectOrder);

const orderInfo = {
orders: [
Expand Down
34 changes: 1 addition & 33 deletions src/pages/Home/Receipt/StatusReceipt/CompleteReceipt.jsx
Original file line number Diff line number Diff line change
@@ -1,40 +1,8 @@
import React, { useState } from "react";
import React from "react";

const CompleteReceipt = ({
orderProps: { orderNum, time, phone, foodies, payment, price },
}) => {
const [ReceiveModal, setReceiveModal] = useState(false);
const [RefuseModal, setRefuseModal] = useState(false);

const handleReceiveModal = () => {
console.log(ReceiveModal);
setReceiveModal((prev) => !prev);
};

const handleRefuseModal = () => {
setRefuseModal((prev) => !prev);
};
const orderInfo = {
orders: [
{
id: 123, //db 인덱스
orderNum: 2, // 그날의 그가게의 주문번호
pickUp: "픽업",
foodies: [
{
name: "아메리카노",
count: 3,
options: ["샷 추가", "휘핑", "ICE", "그란데"],
},
],
phone: "010-6439-3547", // 고객의 전화번호
time: "21/11/08 11:44:30", // 주문시간
payment: "현대카드",
price: 8500,
},
],
};

return (
<div>
<div className="receipt-btn__wrapper">
Expand Down
4 changes: 4 additions & 0 deletions src/pages/Home/StatusHome/Complete.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ const Complete = () => {
} else {
setStatusSelect("complete");
}

setSelectedOrderId(selectedOrder ? selectedOrder.id : null);
console.log(orderCount);
console.log(orderSelect);
console.log(statusSelect);
};

useEffect(() => {
Expand Down
3 changes: 3 additions & 0 deletions src/pages/Home/StatusHome/Progress.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ const Progress = () => {
} else {
setStatusSelect("progress");
}
console.log(orderCount);
console.log(orderSelect);
console.log(statusSelect);
setSelectedOrderId(selectedOrder ? selectedOrder.id : null);
};

Expand Down
3 changes: 3 additions & 0 deletions src/pages/Home/StatusHome/Wait.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ const Wait = () => {
} else {
setStatusSelect("pending");
}
console.log(orderCount);
console.log(orderSelect);
console.log(statusSelect);
setSelectedOrderId(selectedOrder ? selectedOrder.id : null);
};

Expand Down

0 comments on commit 4bc7d38

Please sign in to comment.