Review fixes

This commit is contained in:
x032205
2025-05-22 11:32:49 -04:00
parent 40398efb06
commit f0a45fb7d8
22 changed files with 155 additions and 67 deletions
+6 -2
View File
@@ -1,5 +1,9 @@
const TABLE_PREFERENCES_KEY = "userTablePreferences";
export enum PreferenceKey {
PerPage = "perPage"
}
interface TableSpecificPreferences {
[preferenceKey: string]: any;
}
@@ -33,7 +37,7 @@ const saveAllTablePreferences = (preferences: UserTablePreferences): void => {
// Retrieves a specific preference for a given table
export const getUserTablePreference = <T>(
tableName: string,
preferenceKey: string,
preferenceKey: PreferenceKey,
defaultValue: T
): T => {
const preferences = getAllTablePreferences();
@@ -55,7 +59,7 @@ export const getUserTablePreference = <T>(
// Sets a specific preference for a given table and saves it to localStorage
export const setUserTablePreference = (
tableName: string,
preferenceKey: string,
preferenceKey: PreferenceKey,
value: any
): void => {
const preferences = getAllTablePreferences();