Update UI and improve i18n loading logic

Major changes include enhancements to the UI and modifications to the i18n loading logic to more effectively handle namespaces. Several components were updated to improve readability and layout consistency. The i18n loading logic now includes additional handling for waiting until all namespaces are loaded before the i18n instance is returned, with a warning if it takes longer than expected. Furthermore, code have been refactored for fonts, buttons, and other UI elements.
This commit is contained in:
gbuomprisco
2024-07-18 04:01:45 +08:00
parent 35717c79f7
commit 342c96abfa
16 changed files with 155 additions and 141 deletions

View File

@@ -1,4 +1,4 @@
import { Urbanist as HeadingFont, Inter as SansFont } from 'next/font/google';
import { Inter as SansFont } from 'next/font/google';
/**
* @sans
@@ -16,15 +16,8 @@ const sans = SansFont({
/**
* @heading
* @description Define here the heading font.
* By default, it uses the Urbanist font from Google Fonts.
*/
const heading = HeadingFont({
subsets: ['latin'],
variable: '--font-heading',
fallback: ['system-ui', 'Helvetica Neue', 'Helvetica', 'Arial'],
preload: true,
weight: ['500', '600'],
});
const heading = sans;
// we export these fonts into the root layout
export { sans, heading };