use builtin api urls

This commit is contained in:
Samuel Newman
2026-07-17 11:41:27 +03:00
parent 9c6483f6d7
commit 624a536f98
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ import '../index.css'
import {AtUriString, Client, type HandleString} from '@atproto/lex'
import {AtUri} from '@atproto/syntax'
import {api} from '@bsky.app/sdk'
import {app, com} from '@bsky.app/sdk/lexicons'
import {h, render} from 'preact'
import {useEffect, useMemo, useRef, useState} from 'preact/hooks'
@@ -32,7 +33,7 @@ if (!root) throw new Error('No root element')
initSystemColorMode({additionalBodyClasses: 'dark:bg-dimmedBgDarken'})
const client = new Client('https://public.api.bsky.app')
const client = new Client(api.app.urlPublic)
render(<LandingPage />, root)
+2 -1
View File
@@ -1,6 +1,7 @@
import '../index.css'
import {Client, isAtUriString} from '@atproto/lex'
import {api} from '@bsky.app/sdk'
import {app} from '@bsky.app/sdk/lexicons'
import {h, render} from 'preact'
@@ -15,7 +16,7 @@ import logo from '../../assets/logo.svg'
const root = document.getElementById('app')
if (!root) throw new Error('No root element')
const client = new Client('https://public.api.bsky.app')
const client = new Client(api.app.urlPublic)
const uri = `at://${window.location.pathname.slice('/embed/'.length)}`
if (!isAtUriString(uri)) {