A calm place to write long-form, and publish it to the open social web.
skypress.blog/
1import type { AuthStatus } from './AuthProvider';
2
3/**
4 * Whether the signed-in viewer owns the profile being viewed.
5 *
6 * The public author page resolves the profile DID server-side; the viewer DID
7 * comes from the browser-only auth session. The CTA to create a publication is
8 * meaningful only to the owner, since publications are always written under the
9 * viewer's own DID.
10 */
11export function isProfileOwner(
12 status: AuthStatus,
13 viewerDid: string | null,
14 profileDid: string
15): boolean {
16 return status === 'signed-in' && viewerDid !== null && viewerDid === profileDid;
17}