Compare commits

..

No commits in common. "9b797a09a68386c75fae4e8e7ef7629c72157f36" and "be20ea89f62227dc44ef355e0a0b622fac63a11b" have entirely different histories.

6 changed files with 18 additions and 21 deletions

File diff suppressed because one or more lines are too long

View File

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

View File

@ -1,12 +1,10 @@
/**
* @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 { useAppSelector } from '../stores/hooks';
import Logo from './Logo';
type Props = {
children?: ReactNode;
@ -9,23 +9,26 @@ 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>© {year} PREVCON. Hand-crafted & Made with .</b>
<b>
&copy;{year},{` `}
<a href='https://flatlogic.com/' rel='noreferrer' target='_blank'>
Flatlogic
</a>
.
</b>
{` `}
{children}
</div>
<div className='flex items-center md:py-2 gap-4'>
<div className='flex item-center md:py-2 gap-4'>
<LanguageSwitcher />
<a href='/'>
<img
src={logoUrl || '/favicon.svg'}
alt={currentUser?.organizations?.name || 'logo'}
className='w-auto h-8 md:h-6'
/>
<a href='https://flatlogic.com/' rel='noreferrer' target='_blank'>
<Logo className='w-auto h-8 md:h-6 mx-auto' />
</a>
</div>
</div>

View File

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