Skip to content

Commit

Permalink
Merge pull request #84 from TripInfoWeb/dev_informations
Browse files Browse the repository at this point in the history
화면 전환 없이 탭만 전환하도록 수정
  • Loading branch information
HyunJinNo authored Jun 29, 2024
2 parents 0922240 + 804c3a0 commit 6bb39f2
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 24 deletions.
File renamed without changes.
7 changes: 0 additions & 7 deletions src/app/informations/layout.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export const metadata: Metadata = {
export default function page({ searchParams }: MyProps) {
return (
<div className="flex flex-col items-center">
<BannerContainer />
<TopListContainer category="여행" />
<CategoryLinks category="숙박" />
<InformationListContainer
category="숙박"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export const metadata: Metadata = {
export default function page({ searchParams }: MyProps) {
return (
<div className="flex flex-col items-center">
<BannerContainer />
<TopListContainer category="여행" />
<CategoryLinks category="액티비티" />
<InformationListContainer
category="액티비티"
Expand Down
16 changes: 16 additions & 0 deletions src/app/informations/list/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import BannerContainer from "@/containers/common/BannerContainer";
import TopListContainer from "@/containers/informations/TopListContainer";

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<div className="flex flex-col items-center">
<BannerContainer />
<TopListContainer category="여행" />
{children}
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export const metadata: Metadata = {
export default function page({ searchParams }: MyProps) {
return (
<div className="flex flex-col items-center">
<BannerContainer />
<TopListContainer category="여행" />
<CategoryLinks category="맛집" />
<InformationListContainer
category="맛집"
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const Header = ({
: "font-medium text-gray1"
} ` + "text-sm hover:text-main"
}
href="/informations/restaurant?subCategory=all"
href="/informations/list/restaurant?subCategory=all"
>
정보
</Link>
Expand Down
10 changes: 5 additions & 5 deletions src/components/common/HeaderSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type MyProps = {

const HeaderSidebar = ({ onClose }: MyProps) => {
return (
<aside className="animate-sidebarFadeIn fixed left-0 top-0 z-50 flex h-full w-[200%]">
<aside className="fixed left-0 top-0 z-50 flex h-full w-[200%] animate-sidebarFadeIn">
<div className="bg-black/25">
<nav className="h-full w-[18.75rem] rounded-r-2xl bg-white p-4">
<div className="flex h-10 w-full items-center justify-between">
Expand Down Expand Up @@ -67,7 +67,7 @@ const HeaderSidebar = ({ onClose }: MyProps) => {
<li className="border-b-2 px-1 py-4">
<Link
className="flex flex-row items-center space-x-2 text-xl hover:bg-gray-100"
href="/informations/restaurant?subCategory=all"
href="/informations/list/restaurant?subCategory=all"
onClick={onClose}
>
<IoMdInformationCircleOutline />
Expand All @@ -76,23 +76,23 @@ const HeaderSidebar = ({ onClose }: MyProps) => {
<div className="flex flex-col space-y-2 pl-4 pt-4">
<Link
className="flex flex-row items-center space-x-2 text-sm hover:bg-gray-100"
href="/informations/restaurant?subCategory=all"
href="/informations/list/restaurant?subCategory=all"
onClick={onClose}
>
<IoRestaurant />
<p>맛집</p>
</Link>
<Link
className="flex flex-row items-center space-x-2 text-sm hover:bg-gray-100"
href="/informations/accommondation?subCategory=all"
href="/informations/list/accommondation?subCategory=all"
onClick={onClose}
>
<FaHotel />
<p>숙박</p>
</Link>
<Link
className="flex flex-row items-center space-x-2 text-sm hover:bg-gray-100"
href="/informations/activity?tag=all"
href="/informations/list/activity?tag=all"
onClick={onClose}
>
<FiActivity />
Expand Down
2 changes: 1 addition & 1 deletion src/components/home/TabList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const TabList = () => {
<div className="mt-20 flex w-[60rem] flex-row items-center justify-between max-[1024px]:w-[39.75rem] max-[744px]:w-[calc(100%_-_48px)] max-[744px]:flex-col max-[744px]:gap-4">
<Link
className="flex h-72 w-[29.375rem] flex-col justify-between rounded-2xl bg-gradient-to-br from-[#CBF6FF] to-[#EBE0FA] p-12 duration-300 hover:scale-105 max-[1024px]:h-48 max-[1024px]:w-[19.25rem] max-[1024px]:p-6 max-[744px]:w-full"
href="/informations/restaurant?subCategory=all"
href="/informations/list/restaurant?subCategory=all"
>
<div className="space-y-2">
<h2 className="text-2xl font-bold text-black max-[1024px]:text-lg">
Expand Down
6 changes: 3 additions & 3 deletions src/components/informations/CategoryLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const CategoryLinks = ({ category }: MyProps) => {
" " +
"hover:main"
}
href="/informations/restaurant?subCategory=all"
href="/informations/list/restaurant?subCategory=all"
>
맛집
</Link>
Expand All @@ -36,7 +36,7 @@ const CategoryLinks = ({ category }: MyProps) => {
" " +
"hover:text-main"
}
href="/informations/accommondation?subCategory=all"
href="/informations/list/accommondation?subCategory=all"
>
숙박
</Link>
Expand All @@ -52,7 +52,7 @@ const CategoryLinks = ({ category }: MyProps) => {
" " +
"hover:text-main"
}
href="/informations/activity?subCategory=all"
href="/informations/list/activity?subCategory=all"
>
액티비티
</Link>
Expand Down
2 changes: 1 addition & 1 deletion src/components/informations/SubCategoryList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const SubCategoryList = ({ category, subCategory }: MyProps) => {
`${subCategory === value.query ? "border-main bg-main text-white" : "text-gray1"} ` +
"rounded-full border-[0.0625rem] border-[#E9EBED] px-3 py-[0.375rem] text-sm font-medium hover:scale-105"
}
href={`/informations/${CATEGORY_TEXT[category]}?subCategory=${value.query}`}
href={`/informations/list/${CATEGORY_TEXT[category]}?subCategory=${value.query}`}
>
{value.buttonText}
</Link>
Expand Down

0 comments on commit 6bb39f2

Please sign in to comment.