diff --git a/.tangled/workflows/deploy.yml b/.tangled/workflows/deploy.yml index 3dbaa6f..71ac63a 100644 --- a/.tangled/workflows/deploy.yml +++ b/.tangled/workflows/deploy.yml @@ -1,9 +1,9 @@ when: - - event: ["push"] - branch: ["main"] - - event: ["manual"] + - event: ['push'] + branch: ['main'] + - event: ['manual'] -engine: "nixery" +engine: 'nixery' dependencies: nixpkgs: @@ -15,9 +15,9 @@ dependencies: - bun environment: - SITE_PATH: "dist" - SITE_NAME: "snrld" - WISP_HANDLE: "aly.codes" + SITE_PATH: 'dist' + SITE_NAME: 'snrld' + WISP_HANDLE: 'aly.codes' steps: - name: build site diff --git a/bun.lock b/bun.lock index 399387e..8a505ae 100644 --- a/bun.lock +++ b/bun.lock @@ -5,6 +5,7 @@ "": { "name": "snrld", "dependencies": { + "@atcute/bluesky": "^4.0.15", "@atcute/client": "^5.1.1", "@atcute/lexicons": "^2.0.3", "@atcute/microcosm": "^2.0.2", @@ -33,6 +34,8 @@ "packages": { "@atcute/atproto": ["@atcute/atproto@4.0.3", "", { "dependencies": { "@atcute/lexicons": "^2.0.2" } }, "sha512-BNylfO7nK0yYBpSpnGhOYgrJTeZWrXHPrb6tOQmp9A3Am0epctIWm6/5lPC4ZNPHpUbwr5w/LzH/v7kjAoKEDg=="], + "@atcute/bluesky": ["@atcute/bluesky@4.0.15", "", { "dependencies": { "@atcute/atproto": "^4.0.3", "@atcute/lexicons": "^2.0.3" } }, "sha512-+pYJihR5/0NF8kbPy2Sz3SjXExPXxNj8MakdIxcMtYS4qi2eSCU8UWMSp3rcBaP9pypURda0q/Q8TrDZNpvucg=="], + "@atcute/client": ["@atcute/client@5.1.1", "", { "dependencies": { "@atcute/identity": "^2.0.1", "@atcute/lexicons": "^2.0.2" } }, "sha512-cn5/Zi/qo37WtQG6gzIC7JPs0RDzX9Z4eaceX45SpKgLZoc3fCFDJcE7C8xsbxBNfjry2T6PmUxWA8obebZsEQ=="], "@atcute/identity": ["@atcute/identity@2.0.2", "", { "dependencies": { "@atcute/lexicons": "^2.0.3", "valibot": "^1.4.2" } }, "sha512-amr/EQceqVtBVmjBK4uUF7nKKYuRttadigpvOcAn4dnO6SNSwSjQi8KDH9LnukEotPsSP4UDsQvNfHWEoUcslw=="], diff --git a/package.json b/package.json index ff89b8d..2ea8f54 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "format:check": "prettier --check ." }, "dependencies": { + "@atcute/bluesky": "^4.0.15", "@atcute/client": "^5.1.1", "@atcute/lexicons": "^2.0.3", "@atcute/microcosm": "^2.0.2", diff --git a/src/components/ProfileByline.tsx b/src/components/ProfileByline.tsx index 3f33d5b..9599d68 100644 --- a/src/components/ProfileByline.tsx +++ b/src/components/ProfileByline.tsx @@ -1,3 +1,4 @@ +import type { AppBskyActorProfile } from '@atcute/bluesky' import type { $output as MiniDoc } from '@atcute/microcosm/types/blue/microcosm/identity/resolveMiniDoc' import { Link } from 'react-router-dom' import { getAvatarUrl } from '../lib/atproto/media' @@ -7,12 +8,14 @@ import { getRepoName } from '../lib/tangled/repo' type ProfileBylineProps = { miniDoc: MiniDoc profile: Profile + bskyProfile?: AppBskyActorProfile.Main | null repo: Repo } -export function ProfileByline({ miniDoc, profile, repo }: ProfileBylineProps) { +export function ProfileByline({ miniDoc, profile, bskyProfile, repo }: ProfileBylineProps) { const { value } = profile - const avatarUrl = value.avatar ? getAvatarUrl(miniDoc.did, value.avatar) : null + const avatar = value.avatar ?? bskyProfile?.avatar + const avatarUrl = avatar ? getAvatarUrl(miniDoc.did, avatar) : null return (