an appview-less Bluesky client using Constellation and PDS Queries reddwarf.app
frontend spa bluesky reddwarf microcosm
1import type Agent from "@atproto/api"; 2import { atom, createStore } from "jotai"; 3import { atomWithStorage } from 'jotai/utils'; 4 5export const store = createStore(); 6 7export const selectedFeedUriAtom = atomWithStorage<string | null>( 8 'selectedFeedUri', 9 null 10); 11 12//export const feedScrollPositionsAtom = atom<Record<string, number>>({}); 13 14/** 15 * @deprecated use the Tanstack Virtual index thanks 16 */ 17export const feedScrollPositionsAtom = atomWithStorage<Record<string, number>>( 18 'feedscrollpositions', 19 {} 20); 21 22export const feedScrollIndexAtom = atomWithStorage<Record<string, number>>('feedScrollIndexes',{}); 23 24export const feedHeightsAtom = atomWithStorage<Record<string, Record<string, number>>>( 25 'feedPostHeights', 26 {} 27); 28 29export const likedPostsAtom = atomWithStorage<Record<string, string>>( 30 'likedPosts', 31 {} 32); 33 34export const agentAtom = atom<Agent|null>(null); 35export const authedAtom = atom<boolean>(false);