handle landing on start link

This commit is contained in:
Hailey
2024-06-13 14:12:40 -07:00
parent 740a8ea1b4
commit b4e220ede9
5 changed files with 25 additions and 6 deletions
+7 -2
View File
@@ -6,16 +6,21 @@ export function useStarterPackEntry() {
const setUsedStarterPack = useSetUsedStarterPack()
React.useEffect(() => {
const url = new URL(window.href)
const url = new URL(window.location.href)
if (url.href.startsWith('https://bsky.app/start/')) {
if (url.pathname.startsWith('/start/')) {
console.log('yes sp')
const [_, _start, name, rkey] = url.pathname.split('/')
console.log()
if (name && rkey) {
setUsedStarterPack({
uri: window.href,
})
}
} else {
console.log('no sp')
}
}, [setUsedStarterPack])