Skip to content

Commit

Permalink
Merge pull request #199 from UPbrella/release-dev
Browse files Browse the repository at this point in the history
Deploy: Release
  • Loading branch information
ShinChanU authored Oct 8, 2023
2 parents da76739 + d30ad2c commit a3c7cb7
Show file tree
Hide file tree
Showing 14 changed files with 374 additions and 271 deletions.
22 changes: 20 additions & 2 deletions src/api/storeApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import {
TClassificationAllStore,
TStoreListDetail,
TStoreListRes,
TStoreBusinessHoursRes,
TStoreImageRes,
} from "@/types/admin/StoreTypes";

const API = {
Expand All @@ -27,6 +29,8 @@ const API = {
STORE_DETAIL: (id: number) => `/stores/${id}`,
ADMIN_STORES_PATCH_ACTIVE: (storeId: number) => `/admin/stores/${storeId}/activate`,
ADMIN_STORES_PATCH_INACTIVE: (storeId: number) => `/admin/stores/${storeId}/inactivate`,
ADMIN_STORES_GET_IMAGE: (storeId: number) => `/admin/stores/${storeId}/images`,
ADMIN_STORES_GET_BUSINESS_HOURS: (storeId: number) => `/admin/stores/${storeId}/businessHours`,
} as const;

// 협업지점 소개 페이지에서의 협업지점 목록 조회
Expand All @@ -47,7 +51,21 @@ export const getStoreDetail = async (id: number) => {
return res.data;
};

// 협업지점 이미지 업로드
// 협업지점 영업시간 조회
export const getStoreBusinessHours = async (storeId: number) => {
const res = await $axios.get<TApiResponse<{ businessHours: TStoreBusinessHoursRes[] }>>(
API.ADMIN_STORES_GET_BUSINESS_HOURS(storeId)
);
return res.data;
};

// 협업지점 이미지 조회
export const getStoreImages = async (storeId: number) => {
const res = await $axios.get<TApiResponse<{ storeId: number; images: TStoreImageRes[] }>>(
API.ADMIN_STORES_GET_IMAGE(storeId)
);
return res.data;
};

// 협업지점 생성
export const postStores = async (params: TStoreParams) => {
Expand All @@ -60,7 +78,7 @@ export const patchStores = async ({
params,
}: {
storeId: number;
params: TStoreParams;
params: Omit<TStoreParams, "activateStatus">;
}) => {
await $axios.patch(API.ADMIN_STORES(storeId), params);
};
Expand Down
5 changes: 0 additions & 5 deletions src/components/atoms/Header/HeaderLogo.tsx

This file was deleted.

10 changes: 8 additions & 2 deletions src/components/atoms/Login/LoginTitle/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ export type LoginTitleProps = {
const LoginTitle = ({ label }: LoginTitleProps) => {
return (
<div className="flex flex-col items-center w-68">
<img className="w-full h-68 mb-16" src={Logo} />
<div className="w-full h-32 text-gray-700 text-24 leading-32 font-bold">{label}</div>
<img
className="w-full mb-16 h-68"
src={Logo}
onError={(e) => {
e.currentTarget.src = Logo;
}}
/>
<div className="w-full h-32 font-bold text-gray-700 text-24 leading-32">{label}</div>
</div>
);
};
Expand Down
175 changes: 0 additions & 175 deletions src/components/molecules/Header/HeaderContents.tsx

This file was deleted.

29 changes: 18 additions & 11 deletions src/components/molecules/MobileMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import Logo from "@/assets/main_logo.svg";
import CloseSharpIcon from "@mui/icons-material/CloseSharp";
import PersonOutlineIcon from "@mui/icons-material/PersonOutline";
import NavigateNextIcon from "@mui/icons-material/NavigateNext";
import { headerNavItems } from "@/components/molecules/Header/HeaderContents";
import { useLogout } from "@/hooks/queries/userQueries";
import { TUserRes } from "@/types/admin/userTypes";
import { Fragment } from "react";
import CardFooter from "@/components/organisms/CardFooter";
import { headerNavItems } from "@/components/organisms/Header/HeaderContainer";

export type TMenu = {
userRes: TUserRes | null;
Expand All @@ -34,11 +34,18 @@ const MobileMenu: React.FC<TMenu> = ({ userRes, setMenuOpen }) => {
};

return (
<div className="relative w-full h-full flex flex-col justify-between">
<div className="relative flex flex-col justify-between w-full h-full">
<div className="bg-white z-100">
<div className="flex justify-between items-center py-16">
<div className="flex items-center justify-between py-16">
<Link to={"/"}>
<img className="w-32 h-32" src={Logo} alt="Logo" />
<img
className="w-32 h-32"
src={Logo}
alt="Logo"
onError={(e) => {
e.currentTarget.src = Logo;
}}
/>
</Link>
<div className="cursor-pointer" onClick={handleMenuClose}>
<CloseSharpIcon />
Expand All @@ -53,19 +60,19 @@ const MobileMenu: React.FC<TMenu> = ({ userRes, setMenuOpen }) => {
<span className="ml-8">{userRes.name}</span>
</div>
<button
className="flex items-center justify-center text-primary-500 transition-all bg-primary-200 rounded-99 pl-16 pr-6 py-8 text-14 font-semibold"
className="flex items-center justify-center py-8 pl-16 pr-6 font-semibold transition-all text-primary-500 bg-primary-200 rounded-99 text-14"
onClick={() => handleNavToUrl("/members/mypage/rent")}
>
마이페이지 <NavigateNextIcon fontSize="small" />
</button>
</div>
) : (
<div className="mb-4">
<div className="font-semibold text-20 text-gray-700 mb-16">
<div className="mb-16 font-semibold text-gray-700 text-20">
업브렐라를 찾아주셔서 감사해요!
</div>
<button
className="rounded-8 font-semibold w-full py-12 text-white bg-primary-500"
className="w-full py-12 font-semibold text-white rounded-8 bg-primary-500"
onClick={() => handleNavToUrl("/login")}
>
로그인
Expand All @@ -80,24 +87,24 @@ const MobileMenu: React.FC<TMenu> = ({ userRes, setMenuOpen }) => {

return (
<Fragment key={name}>
<div className="bg-gray-200 w-full h-1 my-16"></div>
<div className="w-full h-1 my-16 bg-gray-200"></div>
<div>
<NavLink
onClick={() => handleMenuClose()}
key={name}
to={path}
className="px-16 text-15 text-gray-700 hover:text-primary-500 transition-all font-semibold"
className="px-16 font-semibold text-gray-700 transition-all text-15 hover:text-primary-500"
>
{name}
</NavLink>
</div>
</Fragment>
);
})}
<div className="bg-gray-200 w-full h-1 my-16"></div>
<div className="w-full h-1 my-16 bg-gray-200"></div>
{userRes && (
<button
className="flex mx-16 text-14 font-semibold hover:text-primary-500 transition-all"
className="flex mx-16 font-semibold transition-all text-14 hover:text-primary-500"
onClick={onClickLogout}
>
로그아웃
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import FooterSns from "@/components/molecules/Footer/FooterSNS";

const Footer = () => {
return (
<div className="flex justify-between px-40 py-20 smMaxLg:hidden border-t border-gray-100">
<div className="justify-between hidden px-40 py-20 border-t border-gray-100 xl:flex">
<FooterLabel />
<FooterSns />
</div>
Expand Down
Loading

0 comments on commit a3c7cb7

Please sign in to comment.