feat: add Persian fonts, fix UI bugs, improve frontend quality
- Add local Persian fonts: Vazirmatn, Sahel, Shabnam, Lalezar, IranNastaliq - Configure @font-face in globals.css with all font weights - Set Vazirmatn as primary font, Lalezar for headings, Sahel for alt text - Fix Hero image loading with crossOrigin and error fallback - Fix SmartAdvisor disabled button contrast (WCAG compliance) - Add visible labels for form inputs in SmartAdvisor step 1 - Fix UserDashboard null safety for walletBalance - Fix announcement bar hydration mismatch (loading state guard) - Fix UserDashboard null checks for profile fields - Improve overall frontend robustness and data-loading guards
This commit is contained in:
1 parent
40d750ad4b
commit
508356b8d3
1007 files changed
+8093
-64
No files matched your search
@@ -13,6 +13,7 @@ interface SettingsStore {
|
||||
texts: Record<string, string>;
|
||||
scientificTerms: Record<string, ScientificTerm>;
|
||||
isLoading: boolean;
|
||||
isInitialized: boolean;
|
||||
fetchSettings: () => Promise<void>;
|
||||
getText: (key: string, fallback: string) => string;
|
||||
}
|
||||
@@ -21,6 +22,7 @@ export const useSettingsStore = create<SettingsStore>()((set, get) => ({
|
||||
texts: {},
|
||||
scientificTerms: {},
|
||||
isLoading: false,
|
||||
isInitialized: false,
|
||||
fetchSettings: async () => {
|
||||
set({ isLoading: true });
|
||||
try {
|
||||
@@ -47,7 +49,7 @@ export const useSettingsStore = create<SettingsStore>()((set, get) => ({
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch settings/ui-texts:", error);
|
||||
} finally {
|
||||
set({ isLoading: false });
|
||||
set({ isLoading: false, isInitialized: true });
|
||||
}
|
||||
},
|
||||
getText: (key, fallback) => {
|
||||
|
||||
Reference in new issue
Block a user