Auto commit: 2025-07-20T00:34:00.030Z
This commit is contained in:
parent
779bd88887
commit
22a8afc60d
File diff suppressed because one or more lines are too long
4
frontend/next-i18next.config.mjs
Normal file
4
frontend/next-i18next.config.mjs
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export const i18n = {
|
||||||
|
defaultLocale: 'en',
|
||||||
|
locales: ['en', 'es'],
|
||||||
|
};
|
||||||
@ -1,10 +1,12 @@
|
|||||||
/**
|
/**
|
||||||
* @type {import('next').NextConfig}
|
* @type {import('next').NextConfig}
|
||||||
*/
|
*/
|
||||||
|
import { i18n } from './next-i18next.config.mjs';
|
||||||
|
|
||||||
const output = process.env.NODE_ENV === 'production' ? 'export' : 'standalone';
|
const output = process.env.NODE_ENV === 'production' ? 'export' : 'standalone';
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
trailingSlash: true,
|
trailingSlash: true,
|
||||||
|
i18n,
|
||||||
distDir: 'build',
|
distDir: 'build',
|
||||||
output,
|
output,
|
||||||
basePath: '',
|
basePath: '',
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import React, { ReactNode } from 'react';
|
import React, { ReactNode } from 'react';
|
||||||
import LanguageSwitcher from './LanguageSwitcher';
|
import LanguageSwitcher from './LanguageSwitcher';
|
||||||
import { containerMaxW } from '../config';
|
import { containerMaxW } from '../config';
|
||||||
import Logo from './Logo';
|
import { useAppSelector } from '../stores/hooks';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
children?: ReactNode;
|
children?: ReactNode;
|
||||||
@ -9,26 +9,23 @@ type Props = {
|
|||||||
|
|
||||||
export default function FooterBar({ children }: Props) {
|
export default function FooterBar({ children }: Props) {
|
||||||
const year = new Date().getFullYear();
|
const year = new Date().getFullYear();
|
||||||
|
const { currentUser } = useAppSelector((state) => state.auth);
|
||||||
|
const logoUrl = currentUser?.organizations?.logo_url;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<footer className={`py-2 px-6 ${containerMaxW}`}>
|
<footer className={`py-2 px-6 ${containerMaxW}`}>
|
||||||
<div className='block md:flex items-center justify-between'>
|
<div className='block md:flex items-center justify-between'>
|
||||||
<div className='text-center md:text-left mb-6 md:mb-0'>
|
<div className='text-center md:text-left mb-6 md:mb-0'>
|
||||||
<b>
|
<b>© {year} PREVCON. Hand-crafted & Made with ❤️.</b>
|
||||||
©{year},{` `}
|
|
||||||
<a href='https://flatlogic.com/' rel='noreferrer' target='_blank'>
|
|
||||||
Flatlogic
|
|
||||||
</a>
|
|
||||||
.
|
|
||||||
</b>
|
|
||||||
{` `}
|
|
||||||
{children}
|
|
||||||
</div>
|
</div>
|
||||||
|
<div className='flex items-center md:py-2 gap-4'>
|
||||||
<div className='flex item-center md:py-2 gap-4'>
|
|
||||||
<LanguageSwitcher />
|
<LanguageSwitcher />
|
||||||
<a href='https://flatlogic.com/' rel='noreferrer' target='_blank'>
|
<a href='/'>
|
||||||
<Logo className='w-auto h-8 md:h-6 mx-auto' />
|
<img
|
||||||
|
src={logoUrl || '/favicon.svg'}
|
||||||
|
alt={currentUser?.organizations?.name || 'logo'}
|
||||||
|
className='w-auto h-8 md:h-6'
|
||||||
|
/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -125,7 +125,7 @@ export default function LayoutAuthenticated({
|
|||||||
onAsideLgClose={() => setIsAsideLgActive(false)}
|
onAsideLgClose={() => setIsAsideLgActive(false)}
|
||||||
/>
|
/>
|
||||||
{children}
|
{children}
|
||||||
<FooterBar>Hand-crafted & Made with ❤️</FooterBar>
|
<FooterBar />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -29,7 +29,7 @@ export const loginUser = createAsyncThunk(
|
|||||||
'auth/loginUser',
|
'auth/loginUser',
|
||||||
async (creds: Record<string, string>, { rejectWithValue }) => {
|
async (creds: Record<string, string>, { rejectWithValue }) => {
|
||||||
try {
|
try {
|
||||||
const response = await axios.post('auth/signin/local', creds);
|
const response = await axios.post('/auth/signin/local', creds);
|
||||||
return response.data;
|
return response.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (!error.response) {
|
if (!error.response) {
|
||||||
@ -62,7 +62,7 @@ export const passwordReset = createAsyncThunk(
|
|||||||
);
|
);
|
||||||
|
|
||||||
export const findMe = createAsyncThunk('auth/findMe', async () => {
|
export const findMe = createAsyncThunk('auth/findMe', async () => {
|
||||||
const response = await axios.get('auth/me');
|
const response = await axios.get('/auth/me');
|
||||||
return response.data;
|
return response.data;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user