{menu.menuImage ? (
-
+
) : (
<>
사진을 추가해주세요
diff --git a/src/owner/components/MenuEditTab.js b/src/owner/components/MenuEditTab.js
index 27347f1..3aea788 100644
--- a/src/owner/components/MenuEditTab.js
+++ b/src/owner/components/MenuEditTab.js
@@ -20,7 +20,7 @@ const MenuEditTab = ({ items, setItems, storeId }) => {
!newItem.name ||
!newItem.price ||
!newItem.content ||
- !newItem.menuImage
+ !newItem.serverImage
) {
setToastMessage("올바르지 않은 메뉴 정보입니다.");
return;
@@ -37,7 +37,7 @@ const MenuEditTab = ({ items, setItems, storeId }) => {
new Blob([JSON.stringify(dto)], { type: "application/json" })
);
- formData.append("file", newItem.menuImage); // assuming newItem.file is a File object
+ formData.append("file", newItem.serverImage); // assuming newItem.file is a File object
try {
await syluvAxios.post(`/customer/${storeId}/addmenu`, formData, {
diff --git a/src/owner/components/OwnerHeader.js b/src/owner/components/OwnerHeader.js
index 05a76f3..67c409d 100644
--- a/src/owner/components/OwnerHeader.js
+++ b/src/owner/components/OwnerHeader.js
@@ -1,13 +1,13 @@
import styled from "styled-components";
import { useNavigate } from "react-router-dom";
-import { ReactComponent as Syluv } from "assets/images/syluv-small.svg";
import { useState } from "react";
import ButtonModal from "components/Common/ButtonModal";
+import { ReactComponent as ReloadIcon } from "assets/images/reload.svg";
const OwnerHeader = ({ name, stores }) => {
+ const [isClicked, setIsClicked] = useState(false);
const navigate = useNavigate();
const storeData = stores || [];
- const [openModal, setOpenModal] = useState(false);
const handleSelectStore = (storeId) => {
navigate(`/owner/${storeId}`);
@@ -15,50 +15,71 @@ const OwnerHeader = ({ name, stores }) => {
return (
<>
+ {isClicked && (
+
{
+ navigate("/");
+ }}
+ onRightClick={() => {
+ setIsClicked(false);
+ }}
+ />
+ )}
- {openModal && (
- navigate("/")}
- onRightClick={() => setOpenModal(false)}
- />
- )}
>
);
};
export default OwnerHeader;
+const Selecter = styled.select`
+ cursor: pointer;
+ border: none;
+ outline: none;
+ border-radius: 10px;
+ margin-left: 20px;
+ option {
+ border: none;
+ }
+ font-size: 20px;
+ font-weight: ${({ theme }) => theme.fontWeight.bold};
+ appearance: none;
+
+ background-color: white;
+`;
+
const Header = styled.div`
height: 52px;
background-color: white;
display: flex;
align-items: center;
justify-content: space-between;
+ font-weight: ${({ theme }) => theme.fontWeight.bold};
color: ${({ theme }) => theme.color.gray900};
.title {
@@ -69,15 +90,24 @@ const Header = styled.div`
align-items: center;
gap: 12px;
}
+`;
+
+const Reload = styled.div`
+ margin-right: 20px;
+
+ background-color: white;
+ box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
+ border-radius: 100%;
+
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ cursor: pointer;
- select {
- margin-right: 22px;
- font-size: 16px;
- border: 1px solid ${({ theme }) => theme.color.gray300};
- border-radius: 10px;
- outline: none;
- width: 100px;
- height: 30px;
- padding: 0 10px;
+ // 마우스 호버시 앞위로 뒤집히는 효과
+ transition: transform 0.3s;
+ &:hover {
+ transform: rotate(180deg);
}
`;
diff --git a/src/owner/pages/OwnerPage.js b/src/owner/pages/OwnerPage.js
index a357d93..9af9518 100644
--- a/src/owner/pages/OwnerPage.js
+++ b/src/owner/pages/OwnerPage.js
@@ -53,7 +53,9 @@ const OwnerPage = () => {
setItems={setItems}
/>
) : (
-
+ <>
+
+ >
)
) : (
diff --git a/src/pages/MyPage.js b/src/pages/MyPage.js
index 653b605..6e98728 100644
--- a/src/pages/MyPage.js
+++ b/src/pages/MyPage.js
@@ -89,6 +89,14 @@ const MyPage = () => {
계정
+ {
+ navigate("/owner");
+ }}
+ >
+ 상인 계정 전환
+
+
{
handleLogout();
diff --git a/src/pages/OrderDetailPage.js b/src/pages/OrderDetailPage.js
index 24c5b9c..72fa11d 100644
--- a/src/pages/OrderDetailPage.js
+++ b/src/pages/OrderDetailPage.js
@@ -74,9 +74,9 @@ const OrderDetailPage = () => {
{
const syluvAxios = axios.create({
withCredentials: true,
baseURL: baseURL + "/v1",
- timeout: 10000,
+ timeout: 100000,
});
let token = getAccessToken();