app: prefer using useLocation instead of window.location (#15989)

This commit is contained in:
Brendan Allan
2026-03-05 14:41:12 +08:00
committed by GitHub
parent f363904feb
commit 7948de1612
8 changed files with 49 additions and 43 deletions
@@ -0,0 +1,6 @@
export const messageIdFromHash = (hash: string) => {
const value = hash.startsWith("#") ? hash.slice(1) : hash
const match = value.match(/^message-(.+)$/)
if (!match) return
return match[1]
}