forked from jsnbuchanan/crowd-funder-for-time-pwa
refactor: standardize notification usage and document best practices
Move all user-facing notification messages to src/constants/notifications.ts Use TIMEOUTS constants from src/utils/notify.ts for all notification durations Refactor ActivityListItem.vue: Use notification message and duration constants Initialize notify helper in created() with createNotifyHelpers(this.$notify) Add $notify property for Vue runtime injection to satisfy type checker Use type guards or 'as any' for unknown notification payloads Wrap notifyWhyCannotConfirm calls to match expected function signature Fix type import for GiveRecordWithContactInfo Add 'Notification Best Practices and Nuances' section to migration-progress-tracker.md: Document message/duration constants, notify helper pattern, type safety, and wrapper function usage Remove all hardcoded notification strings and durations from components
This commit is contained in:
12
src/constants/notifications.ts
Normal file
12
src/constants/notifications.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
// Notification message constants for user-facing notifications
|
||||
// Add new notification messages here as needed
|
||||
|
||||
export const NOTIFY_PERSON_HIDDEN = {
|
||||
title: "Person Outside Your Network",
|
||||
message: "This person is not visible to you.",
|
||||
};
|
||||
|
||||
export const NOTIFY_UNKNOWN_PERSON = {
|
||||
title: "Unidentified Person",
|
||||
message: "Nobody specific was recognized.",
|
||||
};
|
||||
Reference in New Issue
Block a user