refactor: move sign up, sign in and sign out pages to main/authPages folder and create locales for everyone
This commit is contained in:
7
src/app/main/authPages/authPagesConfig.js
Normal file
7
src/app/main/authPages/authPagesConfig.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import SignInConfig from './sign-in/SignInConfig';
|
||||||
|
import SignOutConfig from './sign-out/SignOutConfig';
|
||||||
|
import SignUpConfig from './sign-up/SignUpConfig';
|
||||||
|
|
||||||
|
const authPagesConfig = [SignInConfig, SignOutConfig, SignUpConfig];
|
||||||
|
|
||||||
|
export default authPagesConfig;
|
||||||
@@ -1,5 +1,10 @@
|
|||||||
|
import i18next from 'i18next';
|
||||||
|
|
||||||
import SignInPage from './SignInPage';
|
import SignInPage from './SignInPage';
|
||||||
import authRoles from '../../auth/authRoles';
|
import authRoles from '../../../auth/authRoles';
|
||||||
|
import en from './i18n/en';
|
||||||
|
|
||||||
|
i18next.addResourceBundle('en', 'signInPage', en);
|
||||||
|
|
||||||
const SignInConfig = {
|
const SignInConfig = {
|
||||||
settings: {
|
settings: {
|
||||||
@@ -15,7 +15,7 @@ import Avatar from '@mui/material/Avatar';
|
|||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import Paper from '@mui/material/Paper';
|
import Paper from '@mui/material/Paper';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import jwtService from '../../auth/services/jwtService';
|
import jwtService from '../../../auth/services/jwtService';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Form Validation Schema
|
* Form Validation Schema
|
||||||
3
src/app/main/authPages/sign-in/i18n/en.js
Normal file
3
src/app/main/authPages/sign-in/i18n/en.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
const locale = {};
|
||||||
|
|
||||||
|
export default locale;
|
||||||
@@ -1,4 +1,9 @@
|
|||||||
|
import i18next from 'i18next';
|
||||||
|
|
||||||
import SignOutPage from './SignOutPage';
|
import SignOutPage from './SignOutPage';
|
||||||
|
import en from './i18n/en';
|
||||||
|
|
||||||
|
i18next.addResourceBundle('en', 'signOutPage', en);
|
||||||
|
|
||||||
const SignOutConfig = {
|
const SignOutConfig = {
|
||||||
settings: {
|
settings: {
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import Paper from '@mui/material/Paper';
|
import Paper from '@mui/material/Paper';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import JwtService from '../../auth/services/jwtService';
|
import JwtService from '../../../auth/services/jwtService';
|
||||||
|
|
||||||
function SignOutPage() {
|
function SignOutPage() {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
3
src/app/main/authPages/sign-out/i18n/en.js
Normal file
3
src/app/main/authPages/sign-out/i18n/en.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
const locale = {};
|
||||||
|
|
||||||
|
export default locale;
|
||||||
@@ -1,5 +1,10 @@
|
|||||||
|
import i18next from 'i18next';
|
||||||
|
|
||||||
import SignUpPage from './SignUpPage';
|
import SignUpPage from './SignUpPage';
|
||||||
import authRoles from '../../auth/authRoles';
|
import authRoles from '../../../auth/authRoles';
|
||||||
|
import en from './i18n/en';
|
||||||
|
|
||||||
|
i18next.addResourceBundle('en', 'signUpPage', en);
|
||||||
|
|
||||||
const SignUpConfig = {
|
const SignUpConfig = {
|
||||||
settings: {
|
settings: {
|
||||||
@@ -14,7 +14,7 @@ import Avatar from '@mui/material/Avatar';
|
|||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import Paper from '@mui/material/Paper';
|
import Paper from '@mui/material/Paper';
|
||||||
import FormHelperText from '@mui/material/FormHelperText';
|
import FormHelperText from '@mui/material/FormHelperText';
|
||||||
import jwtService from '../../auth/services/jwtService';
|
import jwtService from '../../../auth/services/jwtService';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Form Validation Schema
|
* Form Validation Schema
|
||||||
3
src/app/main/authPages/sign-up/i18n/en.js
Normal file
3
src/app/main/authPages/sign-up/i18n/en.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
const locale = {};
|
||||||
|
|
||||||
|
export default locale;
|
||||||
Reference in New Issue
Block a user