Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/components/wineDetail/WineRating.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React from 'react';

import { motion } from 'framer-motion';

import { Progress } from '@/components/ui/progress';
import useWineStore from '@/stores/wineStore';

Expand All @@ -25,11 +23,7 @@ function WineRating({ rating, reviewCount, ratings }: Props) {
});

return (
<motion.div
initial={{ opacity: 0, y: 0 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, amount: 0 }}
transition={{ duration: 1.6, ease: 'easeOut' }}
<div
className='mb-10 md:mb-[60px] md:px-[63px] xl:px-0 w-full xl:max-w-[280px] mx-auto xl:mx-0 order-1 xl:order-2
flex flex-col md:flex-row md:gap-20 xl:gap-0 xl:flex-col xl:relative'
>
Expand Down Expand Up @@ -59,7 +53,7 @@ function WineRating({ rating, reviewCount, ratings }: Props) {
</div>
</>
)}
</motion.div>
</div>
);
}

Expand Down
19 changes: 4 additions & 15 deletions src/pages/wines/[wineid].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { useEffect } from 'react';

import { dehydrate, QueryClient, useQuery } from '@tanstack/react-query';
import axios from 'axios';
import { motion } from 'framer-motion';
import { GetServerSideProps } from 'next';
import dynamic from 'next/dynamic';
import Head from 'next/head';
Expand Down Expand Up @@ -65,12 +64,7 @@ export default function WineInfoById(props: WinePageProps) {
</Head>

<main className='mx-auto px-4 md:px-5 xl:px-0 max-w-[1140px] min-w-[343px]'>
<motion.div
initial={{ opacity: 0.3, x: 40 }}
whileInView={{ opacity: 1, x: 0 }}
viewport={{ once: true, amount: 0.3 }}
transition={{ duration: 0.8, ease: 'easeOut' }}
>
<div>
<ImageCard
imageSrc={data.image}
imageClassName={IMAGE_CLASS_NAME}
Expand All @@ -82,21 +76,16 @@ export default function WineInfoById(props: WinePageProps) {
>
<WineContent name={data.name} region={data.region} price={data.price} />
</ImageCard>
</motion.div>
</div>

<div className='flex flex-col xl:flex-row max-w-[1140px] w-full mx-auto justify-between '>
<div className='flex-col order-2 xl:order-1 xl:max-w-[1140px] '>
<motion.div
initial={{ opacity: 0.3, y: 40 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, amount: 0 }}
transition={{ duration: 0.8, ease: 'easeOut' }}
>
<div>
<h2 className='sr-only xl:not-sr-only !mb-[22px] xl:custom-text-xl-bold'>
리뷰 목록
</h2>
<Reviews wine={data} reviews={data.reviews} reviewCount={data.reviewCount} />
</motion.div>
</div>
</div>

<WineRating
Expand Down
4 changes: 4 additions & 0 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,7 @@
html {
scrollbar-gutter: stable;
}

html body[data-scroll-locked] {
margin-right: 0 !important;
}