From 624a536f987e4ca9fe0eebca7758b2b96afc821a Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Fri, 17 Jul 2026 11:41:27 +0300 Subject: [PATCH] use builtin api urls --- bskyembed/src/screens/landing.tsx | 3 ++- bskyembed/src/screens/post.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bskyembed/src/screens/landing.tsx b/bskyembed/src/screens/landing.tsx index 0984916c1e..21311efd0f 100644 --- a/bskyembed/src/screens/landing.tsx +++ b/bskyembed/src/screens/landing.tsx @@ -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(, root) diff --git a/bskyembed/src/screens/post.tsx b/bskyembed/src/screens/post.tsx index 9c93f5676c..7b7d3bad77 100644 --- a/bskyembed/src/screens/post.tsx +++ b/bskyembed/src/screens/post.tsx @@ -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)) {