Skip to content
Snippets Groups Projects
Commit 99219230 authored by Minseo Lee's avatar Minseo Lee
Browse files

fix: merge conflicts

parent 8e0d623b
Branches
No related tags found
No related merge requests found
...@@ -26,7 +26,6 @@ const SOCKET_URL = process.env.NODE_ENV === 'production' ? PROD_SOCKET_URL : DEV ...@@ -26,7 +26,6 @@ const SOCKET_URL = process.env.NODE_ENV === 'production' ? PROD_SOCKET_URL : DEV
* @name fetchData * @name fetchData
* @param url * @param url
* @param method * @param method
* @param setLogin
* @param payload * @param payload
* @description for body * @description for body
*/ */
......
...@@ -8,7 +8,7 @@ import S from "./OrderBox.module.css"; ...@@ -8,7 +8,7 @@ import S from "./OrderBox.module.css";
import type Connector from "../../../../common/instances/Connector"; import type Connector from "../../../../common/instances/Connector";
import type { MenuPageData } from "../../../menu-page/config/type"; import type { MenuPageData } from "../../../menu-page/config/type";
import type { HistoryPageData } from "../../config/type"; import type { HistoryPageData } from "../../config/type";
import type { FC } from "react"; import type { FC , MutableRefObject } from "react";
interface Props { interface Props {
shop : string; shop : string;
...@@ -17,16 +17,17 @@ interface Props { ...@@ -17,16 +17,17 @@ interface Props {
price : HistoryPageData['totalPrice']; price : HistoryPageData['totalPrice'];
takeout : HistoryPageData['takeout']; takeout : HistoryPageData['takeout'];
status : HistoryPageData['status']; status : HistoryPageData['status'];
connector : Connector; connector : MutableRefObject<Connector | null>;
} }
const OrderBox : FC<Props> = ({ shop, items, waitingCount, price, takeout, status, connector }) => { const OrderBox : FC<Props> = ({ shop, items, waitingCount, price, takeout, status, connector }) => {
const [_name, setName] = useState<string>(''); const [_name, setName] = useState<string>('');
useEffect(() => { useEffect(() => {
if (!connector) return;
void (async () => { void (async () => {
try{ try{
const response = await connector.get<MenuPageData>(`/menu/${items[0].menuId}`); const response = await connector.current!.get<MenuPageData>(`/menu/${items[0].menuId}`);
setName(response.name); setName(response.name);
} catch { } catch {
alert(ALERT.REQ_FAIL); alert(ALERT.REQ_FAIL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment