diff --git a/src/apis/httpClient/httpClient.ts b/src/apis/httpClient/httpClient.ts
index 34ef9092..951a6a52 100644
--- a/src/apis/httpClient/httpClient.ts
+++ b/src/apis/httpClient/httpClient.ts
@@ -180,4 +180,5 @@ export default {
reserve: new HttpClient("api/ber", axiosConfig),
meister: new HttpClient("api/meister", axiosConfig),
ranking: new HttpClient("api/meister/ranking", axiosConfig),
+ main: new HttpClient("api/main", axiosConfig),
};
diff --git a/src/assets/icons/BambooIcon.tsx b/src/assets/icons/BambooIcon.tsx
new file mode 100644
index 00000000..7b23d81d
--- /dev/null
+++ b/src/assets/icons/BambooIcon.tsx
@@ -0,0 +1,20 @@
+import React from "react";
+
+const BambooIcon = () => {
+ return (
+
+ );
+};
+
+export default BambooIcon;
diff --git a/src/assets/icons/BerIcon.tsx b/src/assets/icons/BerIcon.tsx
new file mode 100644
index 00000000..abe6ec5d
--- /dev/null
+++ b/src/assets/icons/BerIcon.tsx
@@ -0,0 +1,20 @@
+import React from "react";
+
+const BerIcon = () => {
+ return (
+
+ );
+};
+
+export default BerIcon;
diff --git a/src/assets/icons/CalenderIcon.tsx b/src/assets/icons/CalenderIcon.tsx
new file mode 100644
index 00000000..0b899d4b
--- /dev/null
+++ b/src/assets/icons/CalenderIcon.tsx
@@ -0,0 +1,26 @@
+import React from "react";
+
+const CalenderIcon = () => {
+ return (
+
+ );
+};
+
+export default CalenderIcon;
diff --git a/src/assets/icons/ChatIcon.tsx b/src/assets/icons/ChatIcon.tsx
new file mode 100644
index 00000000..4b176866
--- /dev/null
+++ b/src/assets/icons/ChatIcon.tsx
@@ -0,0 +1,20 @@
+import React from "react";
+
+const ChatIcon = () => {
+ return (
+
+ );
+};
+
+export default ChatIcon;
diff --git a/src/assets/icons/Logo.tsx b/src/assets/icons/Logo.tsx
index f1e6136a..8fbfc63d 100644
--- a/src/assets/icons/Logo.tsx
+++ b/src/assets/icons/Logo.tsx
@@ -5,6 +5,8 @@ const Logo = ({ isPointable }: SVGAttribute) => {
return (
{
+ return (
+
+ );
+};
+
+export default MealIcon;
diff --git a/src/assets/icons/NoticeIcon.tsx b/src/assets/icons/NoticeIcon.tsx
new file mode 100644
index 00000000..9d03dc8c
--- /dev/null
+++ b/src/assets/icons/NoticeIcon.tsx
@@ -0,0 +1,20 @@
+import React from "react";
+
+const NoticeIcon = () => {
+ return (
+
+ );
+};
+
+export default NoticeIcon;
diff --git a/src/assets/icons/index.ts b/src/assets/icons/index.ts
index 00eb0f5f..e357a398 100644
--- a/src/assets/icons/index.ts
+++ b/src/assets/icons/index.ts
@@ -21,3 +21,9 @@ export { default as HistorySeparator } from "./HistorySeparator";
export { default as UploadIcon } from "./UploadIcon";
export { default as AddCommentIcon } from "./AddCommentIcon";
export { default as DesktopIcon } from "./DesktopIcon";
+export { default as MealIcon } from "./MealIcon";
+export { default as BerIcon } from "./BerIcon";
+export { default as CalenderIcon } from "./CalenderIcon";
+export { default as NoticeIcon } from "./NoticeIcon";
+export { default as ChatIcon } from "./ChatIcon";
+export { default as BambooIcon } from "./BambooIcon";
diff --git a/src/assets/images/index.ts b/src/assets/images/index.ts
index 16755072..712e7b0e 100644
--- a/src/assets/images/index.ts
+++ b/src/assets/images/index.ts
@@ -6,3 +6,5 @@ export { default as QR } from "./QR.png";
export { default as ShushingFace } from "./shushing_face.png";
export { default as ThinkingFace } from "./thinking_face.png";
export { default as HuggingFace } from "./hugging_face.png";
+export { default as TestBanner } from "./test_banner.png";
+export { default as TestSmallBanner } from "./test_small_banner.png";
diff --git a/src/assets/images/test_banner.png b/src/assets/images/test_banner.png
new file mode 100644
index 00000000..490568b6
Binary files /dev/null and b/src/assets/images/test_banner.png differ
diff --git a/src/assets/images/test_small_banner.png b/src/assets/images/test_small_banner.png
new file mode 100644
index 00000000..0daa8762
Binary files /dev/null and b/src/assets/images/test_small_banner.png differ
diff --git a/src/components/common/Aside/InfomationBox.tsx b/src/components/common/Aside/InfomationBox.tsx
index d8d5a23f..9663a54d 100644
--- a/src/components/common/Aside/InfomationBox.tsx
+++ b/src/components/common/Aside/InfomationBox.tsx
@@ -62,10 +62,10 @@ const InfomationBox = ({ user, isLogined }: IInfomationBoxProps) => {
const Container = styled.main`
${flex.CENTER};
width: 100%;
- height: 85px;
+ height: 100%;
background-color: ${color.white};
gap: 8px;
- padding: 0px 22px;
+ padding: 14px 22px;
border-radius: 5px;
@media screen and (max-width: 1074px) {
diff --git a/src/components/common/Aside/JoinCheckBox.tsx b/src/components/common/Aside/JoinCheckBox.tsx
index fc89df60..05ae3e3f 100644
--- a/src/components/common/Aside/JoinCheckBox.tsx
+++ b/src/components/common/Aside/JoinCheckBox.tsx
@@ -19,7 +19,7 @@ const Container = styled.section`
border-radius: 5px;
background-color: ${color.white};
display: flex;
- padding: 18px 0;
+ padding: 22px 0;
justify-content: space-between;
flex-direction: column;
align-items: center;
diff --git a/src/components/common/Aside/MeisterBox.tsx b/src/components/common/Aside/MeisterBox.tsx
index fb6492c0..3a5b9a7d 100644
--- a/src/components/common/Aside/MeisterBox.tsx
+++ b/src/components/common/Aside/MeisterBox.tsx
@@ -36,7 +36,7 @@ const Container = styled.section`
border-radius: 5px;
background-color: ${color.white};
display: flex;
- padding: 6px 0 6px 18px;
+ padding: 10px 0 10px 18px;
flex-direction: column;
justify-content: center;
gap: 6px;
diff --git a/src/components/common/Aside/index.tsx b/src/components/common/Aside/index.tsx
index 94c23aec..4366721b 100644
--- a/src/components/common/Aside/index.tsx
+++ b/src/components/common/Aside/index.tsx
@@ -9,20 +9,27 @@ const Aside = () => {
const { user, isLogined } = useUser();
return (
-
-
- {isLogined && (
-
-
-
-
- )}
-
+
+
+
+ {isLogined && (
+
+
+
+
+ )}
+
+
);
};
+const Layout = styled.div`
+ display: flex;
+`;
+
const Container = styled.aside`
- width: 30vw;
+ width: 22vw;
+ height: 30vh;
display: flex;
gap: 6px;
margin-left: auto;
diff --git a/src/constants/key.constant.ts b/src/constants/key.constant.ts
index 4f772ac8..748a1826 100644
--- a/src/constants/key.constant.ts
+++ b/src/constants/key.constant.ts
@@ -12,6 +12,7 @@ const KEY = {
MEISTER: "useMeister",
MEISTER_DETAIL: "useMeisterDetail",
RANKING: "useRanking",
+ MAIN: "useMain",
} as const;
export default KEY;
diff --git a/src/templates/bamboo/index.tsx b/src/templates/bamboo/index.tsx
index 0f4068f4..eb5350c3 100644
--- a/src/templates/bamboo/index.tsx
+++ b/src/templates/bamboo/index.tsx
@@ -62,7 +62,6 @@ const Container = styled.div`
`;
const AsideButtonBox = styled.div`
- width: 21.4vw;
${flex.COLUMN};
gap: 12px;
margin-left: auto;
diff --git a/src/templates/home/index.tsx b/src/templates/home/index.tsx
index 17032fe9..157a5662 100644
--- a/src/templates/home/index.tsx
+++ b/src/templates/home/index.tsx
@@ -1,11 +1,47 @@
+import React from "react";
import styled from "styled-components";
import { Aside } from "@/components/common";
+import { flex } from "@/styles";
+import { Column, Row } from "@/components/Flex";
+import { useMainQuery } from "./services/query.service";
+import HomeMeal from "./layouts/HomeMeal";
+import HomeReserve from "./layouts/HomeReserve";
+import HomeMainBanner from "./layouts/HomeMainBanner";
+import HomeCalender from "./layouts/HomeCalender";
+import HomePost from "./layouts/HomePost";
+import HomeRadarChart from "./layouts/HomeRadarChart";
+import HomeBamboo from "./layouts/HomeBamboo";
+import HomeMiniBanner from "./layouts/HomeMiniBanner";
const HomePage = () => {
+ const { data } = useMainQuery();
+
+ React.useEffect(() => {
+ if (data) console.log(data);
+ }, [data]);
+
return (
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
);
@@ -20,6 +56,8 @@ const Layout = styled.div`
const Container = styled.div`
width: 76%;
height: 100vh;
+ ${flex.COLUMN};
+ gap: 8px;
`;
export default HomePage;
diff --git a/src/templates/home/layouts/HomeBamboo.tsx b/src/templates/home/layouts/HomeBamboo.tsx
new file mode 100644
index 00000000..d4e27336
--- /dev/null
+++ b/src/templates/home/layouts/HomeBamboo.tsx
@@ -0,0 +1,50 @@
+import { color, font } from "@/styles";
+import React from "react";
+import styled from "styled-components";
+import { BambooIcon } from "@/assets/icons";
+import HomeHead from "./HomeHead";
+
+const HomeBamboo = () => {
+ return (
+
+ }
+ title="#34번째 부마숲 이야기"
+ href="/bamboo"
+ />
+
+ 코로나 정책이 완화된 요즘, 인프런에서 주최하는 컨퍼런스 ‘인프콘’,
+ 안드로이드 개발자를 위한 ‘드로이드 나이츠’, … 그 외 많은 IT인들을 위한
+ 행사들이 곳곳에서 열리고 있습니다. 여러분은 컨퍼런스, IT 대회 등 각종 IT
+ 행사들에 관심이 있으신가요? 특히 컨퍼런스는 IT 업계의 능력있는 사람들이
+ 모여 지식을 공유하고, 네트워킹하며 지식의 뿌리를 넓힐 수 있는 매력적인
+ 행사입니다. 공모전과 같은 대회 역시 자신의 역량을 시험하고 경험을 넓힐
+ 수 있는 귀중한 기회가 되기도 합니다. 여러분은 개발자 컨퍼런스, 대회를
+ 찾을 때 어떻게 찾으시나요? 어쩌다가 생각나서 행사 모음 사이트를
+ 검색하거나 지인에게 건너 듣진 않으신가요? 이런 IT 행사 정보를 간편하게
+ 한 데 모아볼 수 있다면 좋지 않을까요?
+
+
+ );
+};
+
+const Container = styled.div`
+ width: 100%;
+ height: 20vh;
+ background-color: ${color.white};
+ border-radius: 4px;
+`;
+
+const StyledContent = styled.p`
+ ${font.p2};
+ padding: 6px 26px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ line-height: 180%;
+ -webkit-line-clamp: 3; /* 라인수 */
+ -webkit-box-orient: vertical;
+ word-wrap: break-word;
+`;
+
+export default HomeBamboo;
diff --git a/src/templates/home/layouts/HomeCalender.tsx b/src/templates/home/layouts/HomeCalender.tsx
new file mode 100644
index 00000000..c564cc36
--- /dev/null
+++ b/src/templates/home/layouts/HomeCalender.tsx
@@ -0,0 +1,53 @@
+import { color, flex, font } from "@/styles";
+import { CalenderIcon } from "@/assets/icons";
+import React from "react";
+import styled from "styled-components";
+import HomeHead from "./HomeHead";
+
+const HomeCalender = () => {
+ return (
+
+ } title="오늘의 일정" href="/Calender" />
+
+ 학년일정
+
+ - asdmlkasnl
+
+ - asdmlkasnl
+
+ - asdmlkasnl
+
- asdmlkasnl
+
+
+
+ );
+};
+
+const Container = styled.div`
+ width: 46%;
+ height: 30vh;
+ border-radius: 4px;
+ background-color: ${color.white};
+ ${flex.COLUMN};
+`;
+
+const CalenderBody = styled.div`
+ width: 100%;
+ height: 100%;
+ padding: 6px 24px;
+ ${flex.COLUMN};
+`;
+
+const CalenderType = styled.span`
+ ${font.p3};
+ font-weight: 500;
+`;
+
+const CalenderContent = styled.p`
+ ${font.p3};
+ padding-left: 6px;
+ white-space: pre;
+ line-height: 160%;
+`;
+
+export default HomeCalender;
diff --git a/src/templates/home/layouts/HomeHead.tsx b/src/templates/home/layouts/HomeHead.tsx
new file mode 100644
index 00000000..a58d9c53
--- /dev/null
+++ b/src/templates/home/layouts/HomeHead.tsx
@@ -0,0 +1,56 @@
+import { Arrow } from "@/assets/icons";
+import { color, flex, font } from "@/styles";
+import Link from "next/link";
+import React from "react";
+import styled from "styled-components";
+
+interface IHomeHeadProps {
+ icon: React.JSX.Element;
+ title: string;
+ href?: string;
+}
+
+const HomeHead = ({ icon, title, href }: IHomeHeadProps) => {
+ return (
+
+ {icon}
+ {title}
+ {href && (
+
+
+
+
+ )}
+
+ );
+};
+
+const Container = styled.div`
+ margin: 4px 12px;
+ ${flex.HORIZONTAL};
+ gap: 8px;
+ padding: 6px 8px;
+ border-bottom: 1px solid ${color.on_tertiary};
+`;
+
+const StyledTitle = styled.span`
+ ${font.p3};
+ font-weight: 500;
+`;
+
+const StyledLink = styled(Link)`
+ ${flex.HORIZONTAL};
+ margin-left: auto;
+ gap: 4px;
+`;
+
+const StyledLinkHref = styled.span`
+ ${font.p4};
+ color: ${color.gray};
+
+ &:after {
+ content: "자세히 보기";
+ }
+`;
+
+export default HomeHead;
diff --git a/src/templates/home/layouts/HomeMainBanner.tsx b/src/templates/home/layouts/HomeMainBanner.tsx
new file mode 100644
index 00000000..b2b573a5
--- /dev/null
+++ b/src/templates/home/layouts/HomeMainBanner.tsx
@@ -0,0 +1,37 @@
+import { TestBanner } from "@/assets/images";
+import Image from "next/image";
+import { useRouter } from "next/navigation";
+import React from "react";
+import styled from "styled-components";
+
+interface IHomeMainBannerProps {
+ href?: string;
+}
+
+const HomeMainBanner = ({ href }: IHomeMainBannerProps) => {
+ const router = useRouter();
+
+ return (
+
+ router.push(href || "")}
+ src={TestBanner}
+ alt="banner"
+ />
+
+ );
+};
+
+const Container = styled.div`
+ width: 100%;
+ height: 5.5vw;
+`;
+
+const StyledBanner = styled(Image)`
+ width: 100%;
+ height: fit-content;
+ overflow: hidden;
+ cursor: pointer;
+`;
+
+export default HomeMainBanner;
diff --git a/src/templates/home/layouts/HomeMeal.tsx b/src/templates/home/layouts/HomeMeal.tsx
new file mode 100644
index 00000000..d478dee8
--- /dev/null
+++ b/src/templates/home/layouts/HomeMeal.tsx
@@ -0,0 +1,58 @@
+import { color, flex, font } from "@/styles";
+import { MealIcon } from "@/assets/icons";
+import React from "react";
+import styled from "styled-components";
+import HomeHead from "./HomeHead";
+
+const HomeMeal = () => {
+ return (
+
+ } title="오늘의 급식" href="/meal" />
+
+
+ asdmlkasnl
+
+ asdmlkasnl
+
+ asdmlkasnl
+
+ asdmlkasnl
+
+ 852.1
+
+
+ );
+};
+
+const Container = styled.div`
+ width: 46%;
+ height: 30vh;
+ border-radius: 4px;
+ background-color: ${color.white};
+ ${flex.COLUMN};
+`;
+
+const MealBody = styled.div`
+ width: 100%;
+ height: 100%;
+ padding: 6px 24px;
+ display: flex;
+`;
+
+const MealContent = styled.p`
+ ${font.p3};
+ white-space: pre;
+ line-height: 160%;
+`;
+
+const MealCalorie = styled.span`
+ ${font.caption};
+ color: ${color.gray};
+ margin-left: auto;
+
+ &:after {
+ content: "kcal";
+ }
+`;
+
+export default HomeMeal;
diff --git a/src/templates/home/layouts/HomeMiniBanner.tsx b/src/templates/home/layouts/HomeMiniBanner.tsx
new file mode 100644
index 00000000..60d3ce04
--- /dev/null
+++ b/src/templates/home/layouts/HomeMiniBanner.tsx
@@ -0,0 +1,29 @@
+import { TestSmallBanner } from "@/assets/images";
+import Image from "next/image";
+import Link from "next/link";
+import React from "react";
+import styled from "styled-components";
+
+interface IHomeMiniBanner {
+ href: string;
+}
+
+const HomeMiniBanner = ({ href }: IHomeMiniBanner) => {
+ return (
+
+
+
+ );
+};
+
+const Container = styled(Link)`
+ width: 31.2vw;
+`;
+
+const StyledBanner = styled(Image)`
+ width: 100%;
+ height: 100%;
+ border-radius: 4px;
+`;
+
+export default HomeMiniBanner;
diff --git a/src/templates/home/layouts/HomePost.tsx b/src/templates/home/layouts/HomePost.tsx
new file mode 100644
index 00000000..f4265be1
--- /dev/null
+++ b/src/templates/home/layouts/HomePost.tsx
@@ -0,0 +1,36 @@
+import { color } from "@/styles";
+import { ChatIcon, NoticeIcon } from "@/assets/icons";
+import React from "react";
+import styled from "styled-components";
+import HomeHead from "./HomeHead";
+import HomePostList from "./HomePostList";
+
+const HomePost = () => {
+ return (
+
+
+ } title="공지사항" href="/post" />
+
+
+
+ } title="일반 게시판" href="/post" />
+
+
+
+ );
+};
+
+const Container = styled.div`
+ width: 100%;
+ height: 30vh;
+ background-color: ${color.white};
+ border-radius: 4px;
+ display: flex;
+`;
+
+const PostBox = styled.div`
+ width: 100%;
+ height: 100%;
+`;
+
+export default HomePost;
diff --git a/src/templates/home/layouts/HomePostList.tsx b/src/templates/home/layouts/HomePostList.tsx
new file mode 100644
index 00000000..2937c9f2
--- /dev/null
+++ b/src/templates/home/layouts/HomePostList.tsx
@@ -0,0 +1,42 @@
+import { color, flex, font } from "@/styles";
+import React from "react";
+import styled from "styled-components";
+
+const HomePostList = () => {
+ return (
+
+ {Array.from({ length: 4 }).map((_, index) => (
+
+ asodnsaklcn
+ 2023.10.14.
+
+ ))}
+
+ );
+};
+
+const Container = styled.div`
+ width: 100%;
+ padding: 8px 0;
+ ${flex.COLUMN};
+ gap: 8px;
+`;
+
+const PostListItem = styled.div`
+ width: 100%;
+ ${flex.VERTICAL};
+ padding: 0 20px;
+`;
+
+const StyledTitle = styled.span`
+ ${font.p3};
+ font-weight: 600;
+`;
+
+const StyledDate = styled.span`
+ ${font.p4};
+ margin-left: auto;
+ color: ${color.gray};
+`;
+
+export default HomePostList;
diff --git a/src/templates/home/layouts/HomeRadarChart.tsx b/src/templates/home/layouts/HomeRadarChart.tsx
new file mode 100644
index 00000000..049465ed
--- /dev/null
+++ b/src/templates/home/layouts/HomeRadarChart.tsx
@@ -0,0 +1,25 @@
+import { color } from "@/styles";
+import React from "react";
+import styled from "styled-components";
+import DistributionIcon from "@/assets/icons/DistributionIcon";
+import HomeHead from "./HomeHead";
+
+const HomeRadarChart = () => {
+ return (
+
+ }
+ title="인증제 점수"
+ href="/meister"
+ />
+
+ );
+};
+
+const Container = styled.div`
+ width: 31.2vw;
+ border-radius: 4px;
+ background-color: ${color.white};
+`;
+
+export default HomeRadarChart;
diff --git a/src/templates/home/layouts/HomeReserve.tsx b/src/templates/home/layouts/HomeReserve.tsx
new file mode 100644
index 00000000..7c68eedf
--- /dev/null
+++ b/src/templates/home/layouts/HomeReserve.tsx
@@ -0,0 +1,32 @@
+import { color } from "@/styles";
+import { BerIcon } from "@/assets/icons";
+import React from "react";
+import styled from "styled-components";
+import HomeHead from "./HomeHead";
+import HomeReserveMap from "./HomeReserveMap";
+
+const HomeReserve = () => {
+ return (
+
+ } title="베르실 예약" href="/reserve" />
+
+
+
+
+ );
+};
+
+const Container = styled.div`
+ width: 100%;
+ height: 30vh;
+ background-color: ${color.white};
+ border-radius: 4px;
+`;
+
+const ReserveBox = styled.div`
+ width: 100%;
+ height: 100%;
+ padding: 6px 20px;
+`;
+
+export default HomeReserve;
diff --git a/src/templates/home/layouts/HomeReserveMap.tsx b/src/templates/home/layouts/HomeReserveMap.tsx
new file mode 100644
index 00000000..2648e2c0
--- /dev/null
+++ b/src/templates/home/layouts/HomeReserveMap.tsx
@@ -0,0 +1,174 @@
+import { Column, Row } from "@/components/Flex";
+import { roomStore } from "@/store/room.store";
+import { color, flex, font } from "@/styles";
+import dayjs from "dayjs";
+import { useRouter } from "next/navigation";
+import React, { useState } from "react";
+import { useRecoilState } from "recoil";
+import styled, { css } from "styled-components";
+
+interface IReserveMapProps {
+ reservedList: Array;
+}
+
+const HomeReserveMap = ({ reservedList }: IReserveMapProps) => {
+ const [room, setRoom] = useRecoilState(roomStore);
+ const [date, setDate] = useState(dayjs().format("YYYY-MM-DD"));
+ const router = useRouter();
+
+ const handleRoomButtonClick = (roomNumber: number) => {
+ if (reservedList.includes(roomNumber)) return;
+ setRoom(roomNumber);
+ };
+
+ const handleReserveButtonClick = () => {
+ router.push(`/reserve?date=${date}`);
+ };
+
+ return (
+
+
+
+ handleRoomButtonClick(1)}
+ />
+ handleRoomButtonClick(2)}
+ />
+ handleRoomButtonClick(3)}
+ />
+
+
+
+
+ 선택된 베르실
+
+
+
+ 선택된 날짜
+ setDate(e.target.value)}
+ value={date}
+ />
+
+
+
+
+
+
+ handleRoomButtonClick(4)}
+ />
+
+
+ );
+};
+
+const Container = styled.div`
+ width: 100%;
+ display: flex;
+ height: 100%;
+ gap: 8px;
+`;
+
+const CommonRoom = styled.div<{ isClicked?: boolean; isReserved?: boolean }>`
+ width: 100%;
+ height: 6vh;
+ cursor: pointer;
+ ${({ isReserved }) =>
+ isReserved
+ ? css`
+ background-color: ${color.on_tertiary};
+ cursor: default;
+ &:after {
+ content: "예약중";
+ }
+ `
+ : css`
+ background-color: ${color.white};
+ color: ${color.green};
+ &:after {
+ content: "예약 가능";
+ }
+ `}
+ ${({ isClicked }) =>
+ isClicked &&
+ css`
+ background-color: ${color.primary_blue};
+ color: ${color.white};
+ &:after {
+ content: "선택중";
+ }
+ `}
+ box-shadow: 4px 4px 15px 0 rgba(0, 0, 0, 0.03);
+ ${flex.CENTER};
+ ${font.p3};
+`;
+
+const LongRoom = styled(CommonRoom)`
+ width: 100%;
+ height: 20vh;
+`;
+
+const InputContainer = styled.div`
+ width: 100%;
+ height: 13vh;
+ background-color: ${color.white};
+ box-shadow: 4px 4px 15px 0 rgba(0, 0, 0, 0.05);
+ padding: 14px;
+ display: ${flex.CENTER};
+ gap: 8px;
+`;
+
+const StyledInputWrap = styled.div`
+ ${flex.COLUMN};
+ gap: 6px;
+ margin-top: auto;
+`;
+
+const StyledTitle = styled.div`
+ ${font.caption};
+`;
+
+const StyledInput = styled.input`
+ width: 120px;
+ padding: 6px 10px;
+ height: 30px;
+ background-color: ${color.white};
+ ${font.caption};
+ box-shadow: 4px 4px 15px 0 rgba(0, 0, 0, 0.05);
+`;
+
+const StyledButton = styled.button`
+ margin-top: auto;
+ border: none;
+ background-color: ${color.primary_blue};
+ padding: 6px 14px;
+ border-radius: 4px;
+ width: fit-content;
+ height: fit-content;
+ ${font.caption};
+ color: ${color.white};
+ &:after {
+ content: "예약하기";
+ }
+
+ &:disabled {
+ background-color: ${color.on_tertiary};
+ }
+`;
+
+export default HomeReserveMap;
diff --git a/src/templates/home/services/api.service.ts b/src/templates/home/services/api.service.ts
new file mode 100644
index 00000000..65cc16d3
--- /dev/null
+++ b/src/templates/home/services/api.service.ts
@@ -0,0 +1,6 @@
+import httpClient from "@/apis/httpClient";
+
+export const getMain = async () => {
+ const { data } = await httpClient.main.get();
+ return data;
+};
diff --git a/src/templates/home/services/query.service.ts b/src/templates/home/services/query.service.ts
new file mode 100644
index 00000000..db6f40e8
--- /dev/null
+++ b/src/templates/home/services/query.service.ts
@@ -0,0 +1,8 @@
+import { KEY } from "@/constants";
+import { useQuery } from "@tanstack/react-query";
+import { getMain } from "./api.service";
+
+export const useMainQuery = () => {
+ const { data, ...queryRest } = useQuery([KEY.MAIN], getMain);
+ return { data, ...queryRest };
+};
diff --git a/src/templates/reserve/index.tsx b/src/templates/reserve/index.tsx
index d5108dd6..16a0bb2d 100644
--- a/src/templates/reserve/index.tsx
+++ b/src/templates/reserve/index.tsx
@@ -7,6 +7,7 @@ import React from "react";
import dayjs from "dayjs";
import styled from "styled-components";
import { useRecoilValue } from "recoil";
+import { useSearchParams } from "next/navigation";
import { reserveViewTypeStore } from "@/store/reserveViewType.store";
import ReserveJoinBox from "./layouts/ReserveJoinBox";
import ReserveCategories from "./layouts/ReserveCategories";
@@ -16,7 +17,10 @@ import ReserveList from "./layouts/ReserveList";
const ReservePage = () => {
const reserveViewType = useRecoilValue(reserveViewTypeStore);
- const [date, setDate] = React.useState(dayjs().format("YYYY-MM-DD"));
+ const searchParams = useSearchParams();
+ const [date, setDate] = React.useState(
+ searchParams.get("date") || dayjs().format("YYYY-MM-DD"),
+ );
const [reserve, setReserve] = React.useState(emptyReserve);
const { data, isSuccess, refetch } = useReserveListQuery({ date });
@@ -78,9 +82,9 @@ const Title = styled.span`
`;
const ReservationBox = styled.div`
- width: fit-content;
+ width: 100%;
height: fit-content;
- padding: 10px 20px;
+ padding: 0px 20px;
${flex.COLUMN};
gap: 12px;
`;
diff --git a/src/templates/reserve/layouts/ReserveMap.tsx b/src/templates/reserve/layouts/ReserveMap.tsx
index 592fd73f..dd1b1062 100644
--- a/src/templates/reserve/layouts/ReserveMap.tsx
+++ b/src/templates/reserve/layouts/ReserveMap.tsx
@@ -18,39 +18,48 @@ const ReserveMap = ({ reservedList }: IReserveMapProps) => {
};
return (
-
-
- handleRoomButtonClick(1)}
- />
- handleRoomButtonClick(2)}
- />
- handleRoomButtonClick(3)}
- />
-
-
-
+
+
+
+ handleRoomButtonClick(1)}
+ />
+ handleRoomButtonClick(2)}
+ />
+ handleRoomButtonClick(3)}
+ />
+
+
+
+
handleRoomButtonClick(4)}
/>
-
-
+
+
);
};
+const Container = styled.div`
+ width: 100%;
+ display: flex;
+ height: 100%;
+ gap: 8px;
+`;
+
const CommonRoom = styled.div<{ isClicked?: boolean; isReserved?: boolean }>`
- width: 10vw;
+ width: 100%;
height: 8vh;
cursor: pointer;
${({ isReserved }) =>
@@ -84,12 +93,12 @@ const CommonRoom = styled.div<{ isClicked?: boolean; isReserved?: boolean }>`
`;
const LongRoom = styled(CommonRoom)`
- width: 13.3vw;
+ width: 100%;
height: 12vw;
`;
const Wall = styled.div`
- width: 10vw;
+ width: 100%;
height: 8vh;
background-color: ${color.light_gray};
box-shadow: 4px 4px 15px 0 rgba(0, 0, 0, 0.05);