Auto commit: 2025-07-20T00:34:00.030Z

This commit is contained in:
Flatlogic Bot 2025-07-20 00:34:00 +00:00
parent 779bd88887
commit 22a8afc60d
6 changed files with 21 additions and 18 deletions

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,4 @@
export const i18n = {
defaultLocale: 'en',
locales: ['en', 'es'],
};

View File

@ -1,10 +1,12 @@
/**
* @type {import('next').NextConfig}
*/
import { i18n } from './next-i18next.config.mjs';
const output = process.env.NODE_ENV === 'production' ? 'export' : 'standalone';
const nextConfig = {
trailingSlash: true,
i18n,
distDir: 'build',
output,
basePath: '',

View File

@ -1,7 +1,7 @@
import React, { ReactNode } from 'react';
import LanguageSwitcher from './LanguageSwitcher';
import { containerMaxW } from '../config';
import Logo from './Logo';
import { useAppSelector } from '../stores/hooks';
type Props = {
children?: ReactNode;
@ -9,26 +9,23 @@ type Props = {
export default function FooterBar({ children }: Props) {
const year = new Date().getFullYear();
const { currentUser } = useAppSelector((state) => state.auth);
const logoUrl = currentUser?.organizations?.logo_url;
return (
<footer className={`py-2 px-6 ${containerMaxW}`}>
<div className='block md:flex items-center justify-between'>
<div className='text-center md:text-left mb-6 md:mb-0'>
<b>
&copy;{year},{` `}
<a href='https://flatlogic.com/' rel='noreferrer' target='_blank'>
Flatlogic
</a>
.
</b>
{` `}
{children}
<b>© {year} PREVCON. Hand-crafted & Made with .</b>
</div>
<div className='flex item-center md:py-2 gap-4'>
<div className='flex items-center md:py-2 gap-4'>
<LanguageSwitcher />
<a href='https://flatlogic.com/' rel='noreferrer' target='_blank'>
<Logo className='w-auto h-8 md:h-6 mx-auto' />
<a href='/'>
<img
src={logoUrl || '/favicon.svg'}
alt={currentUser?.organizations?.name || 'logo'}
className='w-auto h-8 md:h-6'
/>
</a>
</div>
</div>

View File

@ -125,7 +125,7 @@ export default function LayoutAuthenticated({
onAsideLgClose={() => setIsAsideLgActive(false)}
/>
{children}
<FooterBar>Hand-crafted & Made with </FooterBar>
<FooterBar />
</div>
</div>
);

View File

@ -29,7 +29,7 @@ export const loginUser = createAsyncThunk(
'auth/loginUser',
async (creds: Record<string, string>, { rejectWithValue }) => {
try {
const response = await axios.post('auth/signin/local', creds);
const response = await axios.post('/auth/signin/local', creds);
return response.data;
} catch (error) {
if (!error.response) {
@ -62,7 +62,7 @@ export const passwordReset = createAsyncThunk(
);
export const findMe = createAsyncThunk('auth/findMe', async () => {
const response = await axios.get('auth/me');
const response = await axios.get('/auth/me');
return response.data;
});