chore: upgrade i18next 26, prettier 3, fontsource-variable, domhandler 6, lint-staged 17
- i18next 23->26 + react-i18next 15->17 - prettier 2->3, reformat all files - replace @fontsource/inter with @fontsource-variable/inter 5, update import path - domhandler 5->6 (aligns with transitive deps) - lint-staged 16->17
This commit is contained in:
@@ -9,10 +9,10 @@ export enum NotificationMode {
|
||||
|
||||
export const getNotificationMode = (actions: PushRuleAction[]): NotificationMode => {
|
||||
const soundTweak = actions.find(
|
||||
(action) => typeof action === 'object' && action.set_tweak === TweakName.Sound
|
||||
(action) => typeof action === 'object' && action.set_tweak === TweakName.Sound,
|
||||
);
|
||||
const notify = actions.find(
|
||||
(action) => typeof action === 'string' && action === PushRuleActionName.Notify
|
||||
(action) => typeof action === 'string' && action === PushRuleActionName.Notify,
|
||||
);
|
||||
|
||||
if (notify && soundTweak) return NotificationMode.NotifyLoud;
|
||||
@@ -26,7 +26,7 @@ export type NotificationModeOptions = {
|
||||
};
|
||||
export const getNotificationModeActions = (
|
||||
mode: NotificationMode,
|
||||
options?: NotificationModeOptions
|
||||
options?: NotificationModeOptions,
|
||||
): PushRuleAction[] => {
|
||||
if (mode === NotificationMode.OFF) return [];
|
||||
|
||||
@@ -51,11 +51,11 @@ export const getNotificationModeActions = (
|
||||
|
||||
export type GetNotificationModeCallback = (mode: NotificationMode) => PushRuleAction[];
|
||||
export const useNotificationModeActions = (
|
||||
options?: NotificationModeOptions
|
||||
options?: NotificationModeOptions,
|
||||
): GetNotificationModeCallback => {
|
||||
const getAction: GetNotificationModeCallback = useCallback(
|
||||
(mode) => getNotificationModeActions(mode, options),
|
||||
[options]
|
||||
[options],
|
||||
);
|
||||
|
||||
return getAction;
|
||||
|
||||
Reference in New Issue
Block a user