use builtin api urls
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user