Clean up and fix push notifications implementation

This commit is contained in:
Jon Staab
2026-01-23 15:35:54 -08:00
parent 286d939097
commit 2528e4acad
7 changed files with 107 additions and 83 deletions
+8
View File
@@ -16,3 +16,11 @@ export const day = (seconds: number) => Math.floor(seconds / DAY)
export const daysBetween = (start: number, end: number) => [...range(start, end, DAY)].map(day)
export const ucFirst = (s: string) => s.slice(0, 1).toUpperCase() + s.slice(1)
export const buildUrl = (base: string | URL, ...pathname: string[]) => {
const url = new URL(base)
url.pathname = '/' + pathname.join('/')
return url.toString()
}