1.0
This commit is contained in:
parent
15dd0bbb01
commit
0b89b5a010
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,3 +1,8 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
*/node_modules/
|
*/node_modules/
|
||||||
*/build/
|
*/build/
|
||||||
|
|
||||||
|
**/node_modules/
|
||||||
|
**/build/
|
||||||
|
.DS_Store
|
||||||
|
.env
|
||||||
File diff suppressed because one or more lines are too long
1
frontend/json/runtimeError.json
Normal file
1
frontend/json/runtimeError.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@ -25,6 +25,11 @@ const nextConfig = {
|
|||||||
hostname: '**',
|
hostname: '**',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
i18n: {
|
||||||
|
locales: ['pt', 'en', 'fr', 'es', 'de'],
|
||||||
|
defaultLocale: 'pt',
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -161,10 +161,10 @@ class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|||||||
|
|
||||||
<div className='space-y-2'>
|
<div className='space-y-2'>
|
||||||
<h2 className='text-xl font-semibold text-pavitra-900'>
|
<h2 className='text-xl font-semibold text-pavitra-900'>
|
||||||
Something went wrong
|
Algo deu errado
|
||||||
</h2>
|
</h2>
|
||||||
<p className='text-pavitra-800'>
|
<p className='text-pavitra-800'>
|
||||||
We're sorry, but we encountered an unexpected error.
|
Desculpe, mas ocorreu um erro inesperado.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,8 @@ import Select, {
|
|||||||
type LanguageOption = { label: string; value: string };
|
type LanguageOption = { label: string; value: string };
|
||||||
|
|
||||||
const LANGS: LanguageOption[] = [
|
const LANGS: LanguageOption[] = [
|
||||||
|
{ value: 'pt', label: '🇧🇷 PT' },
|
||||||
|
|
||||||
{ value: 'en', label: '🇬🇧 EN' },
|
{ value: 'en', label: '🇬🇧 EN' },
|
||||||
{ value: 'fr', label: '🇫🇷 FR' },
|
{ value: 'fr', label: '🇫🇷 FR' },
|
||||||
{ value: 'es', label: '🇪🇸 ES' },
|
{ value: 'es', label: '🇪🇸 ES' },
|
||||||
|
|||||||
@ -77,7 +77,7 @@ export const SmartWidget = ({ widget, userId, admin, roleId }) => {
|
|||||||
)
|
)
|
||||||
) : (
|
) : (
|
||||||
<div className='text-center text-red-400'>
|
<div className='text-center text-red-400'>
|
||||||
Something went wrong, please try again or use a different query.
|
Algo deu errado, tente novamente ou use uma consulta diferente.
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -8,7 +8,7 @@ i18n
|
|||||||
.use(LanguageDetector)
|
.use(LanguageDetector)
|
||||||
.use(initReactI18next)
|
.use(initReactI18next)
|
||||||
.init({
|
.init({
|
||||||
fallbackLng: 'en',
|
fallbackLng: 'pt',
|
||||||
detection: {
|
detection: {
|
||||||
order: ['localStorage', 'navigator'],
|
order: ['localStorage', 'navigator'],
|
||||||
lookupLocalStorage: 'app_lang_33581',
|
lookupLocalStorage: 'app_lang_33581',
|
||||||
|
|||||||
@ -95,7 +95,7 @@ export const authSlice = createSlice({
|
|||||||
|
|
||||||
builder.addCase(loginUser.rejected, (state, action) => {
|
builder.addCase(loginUser.rejected, (state, action) => {
|
||||||
state.errorMessage =
|
state.errorMessage =
|
||||||
String(action.payload) || 'Something went wrong. Try again';
|
state.errorMessage = String(action.payload) || 'Algo deu errado. Tente novamente.';
|
||||||
state.isFetching = false;
|
state.isFetching = false;
|
||||||
});
|
});
|
||||||
builder.addCase(findMe.pending, () => {
|
builder.addCase(findMe.pending, () => {
|
||||||
|
|||||||
7
next-i18next.config.js
Normal file
7
next-i18next.config.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
module.exports = {
|
||||||
|
i18n: {
|
||||||
|
locales: ['pt', 'en', 'fr', 'es', 'de'],
|
||||||
|
defaultLocale: 'pt'
|
||||||
|
},
|
||||||
|
reloadOnPrerender: process.env.NODE_ENV === 'development'
|
||||||
|
};
|
||||||
Loading…
x
Reference in New Issue
Block a user