diff --git a/src/app/(user)/auth/login/page.jsx b/src/app/(user)/auth/login/page.jsx
index 5ca96bc..86e7efc 100644
--- a/src/app/(user)/auth/login/page.jsx
+++ b/src/app/(user)/auth/login/page.jsx
@@ -5,6 +5,7 @@ import GuestGuard from 'src/guards/guest';
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 = {
@@ -33,10 +34,7 @@ export default async function Login() {
>
- Login
-
-
- Login to your account to continue
+ {lang.login}
diff --git a/src/app/(user)/auth/register/page.jsx b/src/app/(user)/auth/register/page.jsx
index 30cd4c1..7f56f71 100644
--- a/src/app/(user)/auth/register/page.jsx
+++ b/src/app/(user)/auth/register/page.jsx
@@ -4,16 +4,16 @@ import GuestGuard from 'src/guards/guest';
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 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() {
return (
@@ -31,10 +31,7 @@ export default async function Register() {
}}
>
- Sign up
-
-
- Create your account
+ {lang['Create your account']}
diff --git a/src/app/(user)/products/page.jsx b/src/app/(user)/products/page.jsx
index 8379d05..df69013 100644
--- a/src/app/(user)/products/page.jsx
+++ b/src/app/(user)/products/page.jsx
@@ -2,7 +2,7 @@
import { Box, Container } from '@mui/material';
// components
-import HeaderBreadcrumbs from 'src/components/headerBreadcrumbs';
+// import HeaderBreadcrumbs from 'src/components/headerBreadcrumbs';
import ProductList from 'src/components/_main/products';
export default async function Listing() {
@@ -10,7 +10,7 @@ export default async function Listing() {
-
+ /> */}
diff --git a/src/components/_main/home/featured/index.jsx b/src/components/_main/home/featured/index.jsx
index 201fd17..987cef2 100644
--- a/src/components/_main/home/featured/index.jsx
+++ b/src/components/_main/home/featured/index.jsx
@@ -12,6 +12,7 @@ import { useQuery } from 'react-query';
import ProductsCarousel from 'src/components/carousels/gridSlider';
// icons
import { IoIosArrowForward } from 'react-icons/io';
+import { lang } from 'src/components/lang/kr';
export default function Index() {
const { data, isLoading } = useQuery(['featured-products'], () => api.getFeaturedProducts());
@@ -25,7 +26,7 @@ export default function Index() {
>
- 상품
+ {lang['Products']}
{!isLoading && !Boolean(data?.data.length) ? (
- Products not found
+ {lang['Products not found']}
) : (
@@ -65,9 +66,10 @@ export default function Index() {
}}
endIcon={}
component={NextLink}
- href={`/categories`}
+ // href={`/categories`}
+ href={`/products?featured=true`}
>
- View More
+ {lang['View More']}
);
diff --git a/src/components/_main/home/shop/index.jsx b/src/components/_main/home/shop/index.jsx
index 9f9b46e..3ac9566 100644
--- a/src/components/_main/home/shop/index.jsx
+++ b/src/components/_main/home/shop/index.jsx
@@ -10,6 +10,7 @@ import { Typography, Grid, Box, Stack, Paper, Button } from '@mui/material';
import { IoIosArrowForward } from 'react-icons/io';
// component
import ShopCard from 'src/components/cards/shop';
+import { lang } from 'src/components/lang/kr';
export default function ShopComponent() {
const { shops = [], isLoading } = useSelector(({ shops }) => shops);
@@ -24,11 +25,8 @@ export default function ShopComponent() {
mb={3}
>
-
- Best Shops
-
-
- Our Highest Rated Shops Where You Can Find What You Are Looking For
+
+ {lang['Best Shops']}
@@ -79,7 +77,7 @@ export default function ShopComponent() {
component={NextLink}
href={`/shops`}
>
- View More
+ {lang['View More']}
diff --git a/src/components/_main/home/top/index.jsx b/src/components/_main/home/top/index.jsx
index b5965fb..63c910c 100644
--- a/src/components/_main/home/top/index.jsx
+++ b/src/components/_main/home/top/index.jsx
@@ -11,6 +11,7 @@ import { useQuery } from 'react-query';
import ProductsCarousel from 'src/components/carousels/gridSlider';
// icons
import { IoIosArrowForward } from 'react-icons/io';
+import { lang } from 'src/components/lang/kr';
export default function Index() {
const { data, isLoading } = useQuery(['get-top-products'], () => api.getTopRatedProducts());
@@ -44,12 +45,12 @@ export default function Index() {
component={NextLink}
href={`/products?top=1`}
>
- View More
+ {lang['View More']}
{!isLoading && !Boolean(data?.data.length) ? (
- Products not found
+ {lang['Products not found']}
) : (
@@ -68,7 +69,7 @@ export default function Index() {
component={NextLink}
href={`/products?top=1`}
>
- View More
+ {lang['View More']}
);
diff --git a/src/components/_main/products/index.jsx b/src/components/_main/products/index.jsx
index 6b0fb44..d43f1e4 100644
--- a/src/components/_main/products/index.jsx
+++ b/src/components/_main/products/index.jsx
@@ -66,7 +66,7 @@ export default function ProductListing({ category, subCategory, shop, compaign }
const isMobile = useMediaQuery('(max-width:900px)');
return (
<>
-
+ /> */}
>
diff --git a/src/components/forms/login.jsx b/src/components/forms/login.jsx
index dff9827..bad93a9 100644
--- a/src/components/forms/login.jsx
+++ b/src/components/forms/login.jsx
@@ -6,7 +6,7 @@ import RouterLink from 'next/link';
import { useSearchParams } from 'next/navigation';
import { useRouter } from 'next-nprogress-bar';
import toast from 'react-hot-toast';
-
+import { lang } from '../lang/kr';
// formik
import { useFormik, Form, FormikProvider } from 'formik';
// cookies
@@ -26,10 +26,7 @@ import {
TextField,
IconButton,
InputAdornment,
- FormControlLabel,
- Button,
- Alert,
- AlertTitle
+ FormControlLabel
} from '@mui/material';
import { LoadingButton } from '@mui/lab';
// icons
@@ -49,7 +46,7 @@ export default function LoginForm() {
dispatch(setWishlist(data.user.wishlist));
await createCookies('token', data.token);
setloading(false);
- toast.success('Logged in successfully!');
+ toast.success(lang['Logged in successfully!']);
const isAdmin = data.user.role.includes('admin');
const isVendor = data.user.role.includes('vendor');
push(redirect || isAdmin ? '/admin/dashboard' : isVendor ? '/vendor/dashboard' : '/');
@@ -60,8 +57,10 @@ export default function LoginForm() {
}
});
const LoginSchema = Yup.object().shape({
- email: Yup.string().email('Enter valid email').required('Email is required.'),
- password: Yup.string().required('Password is required.').min(8, 'Password should be 8 characters or longer.')
+ email: Yup.string().email(lang['Enter valid email']).required(lang['Email is required']),
+ password: Yup.string()
+ .required(lang['Password is required'])
+ .min(8, lang['Password should be 8 characters or longer'])
});
const formik = useFormik({
initialValues: {
@@ -77,62 +76,15 @@ export default function LoginForm() {
mutate({ email, password });
}
});
- const { errors, touched, setFieldValue, values, handleSubmit, getFieldProps } = formik;
+ const { errors, touched, values, handleSubmit, getFieldProps } = formik;
return (
<>
-
- {
- setFieldValue('email', 'admin@nextall.com');
- setFieldValue('password', 'test1234');
- }}
- >
- Copy
-
- }
- >
- Admin
- Email: admin@test.com | password: test1234
-
- {
- setFieldValue('email', 'vendor@nextall.com');
- setFieldValue('password', 'test1234');
- }}
- >
- Copy
-
- }
- >
- Vendor
- Email: vendor@test.com | password: test1234
-
-
-
diff --git a/src/components/forms/register.jsx b/src/components/forms/register.jsx
index 0bac20f..c5ce8da 100644
--- a/src/components/forms/register.jsx
+++ b/src/components/forms/register.jsx
@@ -29,6 +29,7 @@ import { MdLocalPhone } from 'react-icons/md';
import { FaTransgender } from 'react-icons/fa6';
// hooks
import { createCookies } from 'src/hooks/cookies';
+import { lang } from '../lang/kr';
export default function RegisterForm() {
const router = useRouter();
@@ -49,8 +50,8 @@ export default function RegisterForm() {
const formik = useFormik({
initialValues: {
firstName: '',
- lastName: '',
- phone: '',
+ lastName: 'test',
+ phone: '01012345678',
gender: 'male',
email: '',
password: ''
@@ -103,84 +104,10 @@ export default function RegisterForm() {
}}
/>
-
-
- Last Name
-
-
-
-
- )
- }}
- />
-
-
-
-
-
- Gender
-
-
- {values.gender === 'male' ? (
-
- ) : values.gender === 'female' ? (
-
- ) : (
-
- )}
-
- )
- }}
- >
- {['Male', 'Female', 'Other'].map((option) => (
-
- ))}
-
-
-
-
- Phone
-
-
-
-
- )
- }}
- />
-
- Email
+ {lang.Email}
- Password
+ {lang.Password}
- Register
+ {lang.Register}
- Already have an account?
- Login
+ {lang.login}
-
+ {/*
By registering, I agree to Nextall
Terms
@@ -252,7 +178,7 @@ export default function RegisterForm() {
Privacy policy
.
-
+ */}
);
diff --git a/src/components/lang/kr.js b/src/components/lang/kr.js
new file mode 100644
index 0000000..affc0d8
--- /dev/null
+++ b/src/components/lang/kr.js
@@ -0,0 +1,21 @@
+export const lang = {
+ "Don't you have an account?": '가입하기',
+ Register: '가입',
+ 'Forgot password': '비밀번호 찾기',
+ login: '로그인',
+ 'Remember me': '아이디 저장',
+ Password: '비밀번호',
+ Email: '이메일',
+ 'Enter valid email': '정확한 이메일을 입력해주세요',
+ 'Email is required': '이메일은 필수 입니다',
+ 'Password is required': '비밀번호는 필수 입니다',
+ 'Password should be 8 characters or longer': '비밀번호는 8자 이상이 되어야 합니다',
+ 'Logged in successfully!': '로그인 성공!',
+ 'Create your account': '회원가입',
+ 'First Name': '이름',
+ Register: '가입하기',
+ 'Best Shops': '상점 목록',
+ 'View More': '더보기',
+ 'Products not found': '상품이 준비되지 않았습니다',
+ Products: '상품'
+};
diff --git a/src/layout/_main/config.json b/src/layout/_main/config.json
index 4fb7f1f..dd2d77b 100644
--- a/src/layout/_main/config.json
+++ b/src/layout/_main/config.json
@@ -34,23 +34,23 @@
],
"mobile_menu": [
{
- "name": "Home",
+ "name": "홈",
"href": "/"
},
{
- "name": "Search",
+ "name": "검색",
"href": "/search"
},
{
- "name": "Product",
+ "name": "상품",
"href": "/products"
},
{
- "name": "Cart",
+ "name": "카트",
"href": "/cart"
},
{
- "name": "User",
+ "name": "사용자",
"isUser": true,
"href": "/auth/login"
}