enable post.html in dev

This commit is contained in:
Samuel Newman
2024-04-13 13:13:14 +01:00
parent 66fe7f47a2
commit 6f224c6e2c
+7 -1
View File
@@ -16,7 +16,13 @@ const agent = new BskyAgent({
service: 'https://public.api.bsky.app',
})
const uri = `at://${window.location.pathname.slice('/embed/'.length)}`
let uri
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
if (import.meta.env.DEV) {
uri = new URLSearchParams(window.location.search).get('uri')
} else {
uri = `at://${window.location.pathname.slice('/embed/'.length)}`
}
console.log(uri)