From c8447d1acb319e1aa727a989f3338f61bd391444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B5=ED=9D=AC=20=EA=B9=80?= Date: Sun, 8 Dec 2024 21:05:09 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 5 +- .env.production | 2 +- src/app/(user)/auth/login/page.jsx | 60 +++++------ src/app/(user)/auth/register/page.jsx | 34 ++++-- src/app/(user)/layout.jsx | 4 +- src/app/(user)/shops/page.jsx | 3 +- src/components/forms/login.jsx | 49 +++++++-- src/components/forms/register.jsx | 7 +- src/components/forms/userShop.jsx | 54 +++++----- src/components/lang/kr.js | 53 ++++++++- src/components/lang/langUtil.js | 9 ++ src/components/select/userSelect/index.jsx | 5 +- src/hooks/cookies.js | 4 + .../_main/actionbar/menuDesktop/index.jsx | 1 - src/layout/_main/config copy.json | 101 ++++++++++++++++++ src/layout/_main/config.json | 17 --- src/layout/_main/navbar/index.jsx | 6 +- src/layout/_main/topbar/index.jsx | 5 +- 18 files changed, 302 insertions(+), 117 deletions(-) create mode 100644 src/components/lang/langUtil.js create mode 100644 src/layout/_main/config copy.json diff --git a/.env.development b/.env.development index c24ffb5..9be27ad 100644 --- a/.env.development +++ b/.env.development @@ -1,9 +1,10 @@ -BASE_URL=http://localhost:5100 +BASE_URL=http://101.79.10.128:5100 +# BASE_URL=http://localhost:5100 STRIPE_PUBLIC_KEY= STRIPE_SECRET_KEY= PAYPAL_CLIENT_ID= CLOUDINARY_CLOUD_NAME="dmjztlmj4" BASE_CURRENCY=KRW SHIPPING_FEE= -JWT_SECRET= +JWT_SECRET="123456" diff --git a/.env.production b/.env.production index 697bbb7..54f0f0e 100644 --- a/.env.production +++ b/.env.production @@ -6,4 +6,4 @@ PAYPAL_CLIENT_ID= CLOUDINARY_CLOUD_NAME="dmjztlmj4" BASE_CURRENCY=KRW SHIPPING_FEE= -JWT_SECRET= +JWT_SECRET="123456" diff --git a/src/app/(user)/auth/login/page.jsx b/src/app/(user)/auth/login/page.jsx index 86e7efc..90524f7 100644 --- a/src/app/(user)/auth/login/page.jsx +++ b/src/app/(user)/auth/login/page.jsx @@ -1,47 +1,39 @@ -import React from 'react'; +'use client'; + +import React, { useEffect, useState } from 'react'; // guard import GuestGuard from 'src/guards/guest'; // mui import { Card, Stack, Container, Typography } from '@mui/material'; // components import LoginMain from 'src/components/_main/auth/login'; + import { lang } from 'src/components/lang/kr'; -// Meta information -export const metadata = { - title: 'Login to Nextall | Your Gateway to Seamless Shopping and Secure Transactions', - description: - 'Log in to Nextall for secure access to your account. Enjoy seamless shopping, personalized experiences, and hassle-free transactions. Your trusted portal to a world of convenience awaits. Login now!', - applicationName: 'Nextall', - authors: 'Nextall', - keywords: 'ecommerce, Nextall, Commerce, Login Nextall, LoginFrom Nextall' -}; +export default function Login() { -export default async function Login() { return ( - <> - - - - - - {lang.login} - - + + + + + + {lang.login} + + - - - - - + + + + ); } diff --git a/src/app/(user)/auth/register/page.jsx b/src/app/(user)/auth/register/page.jsx index 7f56f71..b6f026b 100644 --- a/src/app/(user)/auth/register/page.jsx +++ b/src/app/(user)/auth/register/page.jsx @@ -1,21 +1,33 @@ +'use client' + // guard import GuestGuard from 'src/guards/guest'; +import { useEffect, useState } from 'react'; + // mui import { Card, Container, Typography } from '@mui/material'; // components import RegisterMain from 'src/components/_main/auth/register'; import { lang } from 'src/components/lang/kr'; -// Meta information -// export const metadata = { -// title: 'Create Your Nextall Account | Join Us for Exclusive Deals and Seamless Shopping', -// description: -// 'Register with Nextall today to unlock a world of exclusive deals, personalized recommendations, and secure transactions. Join our community for a seamless shopping experience. Sign up now and elevate your online shopping journey!', -// applicationName: 'Nextall', -// authors: 'Nextall', -// keywords: 'ecommerce, Nextall, Commerce, Register Nextall, RegisterFrom Nextall' -// }; -export default async function Register() { +// Next.js navigation API +import { useSearchParams } from 'next/navigation'; + +export default function Register() { + const searchParams = useSearchParams(); // Next.js navigation API + const [segmentTitle, setSegmentTitle] = useState(''); + + useEffect(() => { + const redirectParam = searchParams.get('redirect'); + console.log('Redirect Param:', redirectParam); + + if (redirectParam === '/create-shop') { + setSegmentTitle(lang.seller); + } else { + setSegmentTitle(lang.buyer); + } + }, [searchParams]); + return ( <> @@ -31,7 +43,7 @@ export default async function Register() { }} > - {lang['Create your account']} + {segmentTitle} {lang['Create your account']} diff --git a/src/app/(user)/layout.jsx b/src/app/(user)/layout.jsx index 8e9dbc0..5af8d07 100644 --- a/src/app/(user)/layout.jsx +++ b/src/app/(user)/layout.jsx @@ -5,7 +5,7 @@ import { Toolbar } from '@mui/material'; // components import Navbar from 'src/layout/_main/navbar'; -import Footer from 'src/layout/_main/footer'; +// import Footer from 'src/layout/_main/footer'; import Topbar from 'src/layout/_main/topbar'; import ActionBar from 'src/layout/_main/actionbar'; @@ -32,7 +32,7 @@ export default async function RootLayout({ children }) { {children} -