WIP jordan

This commit is contained in:
Jordan Weingarten
2026-04-16 11:11:44 -05:00
parent ff2d7b18b5
commit 67482f6629
163 changed files with 50627 additions and 728 deletions

View File

@@ -0,0 +1,26 @@
import {
emptyProviderContacts,
PROVIDER_EMAIL_ROLE_LABEL,
PROVIDER_EMAIL_ROLE_ORDER,
type ProviderContactEmails,
type ProviderEmailRole
} from '~/types/provider-contacts'
import { useLocalStorageRef } from '~/utils/useLocalStorageRef'
function storageKey(providerId: string) {
return `policy-ui-provider-contacts-v1-${providerId}`
}
export function useProviderContactEmails(providerId: string) {
const emails = useLocalStorageRef(storageKey(providerId), emptyProviderContacts)
function label(r: ProviderEmailRole) {
return PROVIDER_EMAIL_ROLE_LABEL[r]
}
return {
emails,
roles: PROVIDER_EMAIL_ROLE_ORDER,
label
}
}