-
+
+ {member ? (
+
+ 리뷰 작성하기
+
+ ) : (
+
+ )}
diff --git a/src/pages/ProductDetailPage/productDetailPage.css.ts b/src/pages/ProductDetailPage/productDetailPage.css.ts
index 78cc32f3..7e8701b7 100644
--- a/src/pages/ProductDetailPage/productDetailPage.css.ts
+++ b/src/pages/ProductDetailPage/productDetailPage.css.ts
@@ -1,5 +1,5 @@
import { vars } from '@/styles/theme.css';
-import { style, styleVariants } from '@vanilla-extract/css';
+import { style } from '@vanilla-extract/css';
export const main = style({
paddingBottom: 70,
@@ -16,7 +16,7 @@ export const sortWrapper = style({
right: 20,
});
-export const registerButtonWrapper = style({
+export const linkWrapper = style({
position: 'fixed',
left: '50%',
bottom: 0,
@@ -32,7 +32,10 @@ export const registerButtonWrapper = style({
transform: 'translateX(-50%)',
});
-const registerButtonBase = style({
+export const link = style({
+ display: 'flex',
+ justifyContent: 'center',
+ alignItems: 'center',
width: '100%',
height: 56,
backgroundColor: vars.colors.primary,
@@ -40,8 +43,3 @@ const registerButtonBase = style({
borderRadius: 6,
fontWeight: 700,
});
-
-export const registerButton = styleVariants({
- active: [registerButtonBase, { backgroundColor: vars.colors.primary }],
- disabled: [registerButtonBase, { backgroundColor: vars.colors.background.tag }],
-});
diff --git a/src/pages/ReviewRegisterPage/ReviewRegisterPage.tsx b/src/pages/ReviewRegisterPage/ReviewRegisterPage.tsx
index 06ca594d..b9251483 100644
--- a/src/pages/ReviewRegisterPage/ReviewRegisterPage.tsx
+++ b/src/pages/ReviewRegisterPage/ReviewRegisterPage.tsx
@@ -4,11 +4,13 @@ import { useParams } from 'react-router-dom';
import { section } from './reviewRegisterPage.css';
import NotFoundPage from '../NotFoundPage';
+import { TopBar } from '@/components/Common';
import { ReviewRegisterForm, ReviewTagSheet } from '@/components/Review';
-import ReviewFormProvider from '@/contexts/ReviewFormContext';
+import { useReviewFormValueContext } from '@/hooks/context';
export const ReviewRegisterPage = () => {
const { productId } = useParams<{ productId: string }>();
+ const { isValid } = useReviewFormValueContext();
const { isOpen, isClosing, handleOpenBottomSheet, handleCloseBottomSheet } = useBottomSheet();
if (!productId || isNaN(Number(productId))) {
@@ -16,7 +18,11 @@ export const ReviewRegisterPage = () => {
}
return (
-
+ <>
+
+
+
+
@@ -25,6 +31,6 @@ export const ReviewRegisterPage = () => {
-
+ >
);
};
diff --git a/src/pages/ReviewRegisterPage/reviewRegisterPage.css.ts b/src/pages/ReviewRegisterPage/reviewRegisterPage.css.ts
index 93a5f54f..408efe7b 100644
--- a/src/pages/ReviewRegisterPage/reviewRegisterPage.css.ts
+++ b/src/pages/ReviewRegisterPage/reviewRegisterPage.css.ts
@@ -2,5 +2,5 @@ import { style } from '@vanilla-extract/css';
export const section = style({
padding: '0 20px',
- marginBottom: 32,
+ margin: '16px 0 32px',
});
diff --git a/src/router/index.tsx b/src/router/index.tsx
index 843fabb2..d09f5b14 100644
--- a/src/router/index.tsx
+++ b/src/router/index.tsx
@@ -5,6 +5,7 @@ import App from './App';
import { AuthLayout } from '@/components/Layout';
import { PATH } from '@/constants/path';
import CategoryProvider from '@/contexts/CategoryContext';
+import ReviewFormProvider from '@/contexts/ReviewFormContext';
import NotFoundPage from '@/pages/NotFoundPage';
const router = createBrowserRouter([
@@ -179,15 +180,6 @@ const router = createBrowserRouter([
return { Component: ProductDetailPage };
},
},
- {
- path: `${PATH.PRODUCT_LIST}/detail/:productId/review-register`,
- async lazy() {
- const { ReviewRegisterPage } = await import(
- /* webpackChunkName: "ReviewRegisterPage" */ '@/pages/ReviewRegisterPage/ReviewRegisterPage'
- );
- return { Component: ReviewRegisterPage };
- },
- },
{
path: PATH.SEARCH,
async lazy() {
@@ -224,6 +216,26 @@ const router = createBrowserRouter([
},
],
},
+ {
+ path: '/',
+ element: (
+
+
+
+ ),
+ errorElement:
,
+ children: [
+ {
+ path: `${PATH.PRODUCT_LIST}/detail/:productId/review-register`,
+ async lazy() {
+ const { ReviewRegisterPage } = await import(
+ /* webpackChunkName: "ReviewRegisterPage" */ '@/pages/ReviewRegisterPage/ReviewRegisterPage'
+ );
+ return { Component: ReviewRegisterPage };
+ },
+ },
+ ],
+ },
]);
export default router;