don't hate me, old git is fuck up

This commit is contained in:
Ren Amamiya
2023-02-21 14:58:47 +07:00
commit 672298daf9
103 changed files with 12172 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
import { persistentAtom } from '@nanostores/persistent';
export const currentUser = persistentAtom(
'currentUser',
{},
{
encode: JSON.stringify,
decode: JSON.parse,
}
);

10
src/stores/follows.tsx Normal file
View File

@@ -0,0 +1,10 @@
import { persistentAtom } from '@nanostores/persistent';
export const follows = persistentAtom('follows', [], {
encode(value) {
return JSON.stringify(value);
},
decode(value) {
return JSON.parse(value);
},
});

25
src/stores/relays.tsx Normal file
View File

@@ -0,0 +1,25 @@
import { persistentAtom } from '@nanostores/persistent';
export const relays = persistentAtom(
'relays',
[
'wss://relay.uselume.xyz',
'wss://nostr-pub.wellorder.net',
'wss://nostr.bongbong.com',
'wss://nostr.zebedee.cloud',
'wss://nostr.fmt.wiz.biz',
'wss://nostr.walletofsatoshi.com',
'wss://relay.snort.social',
'wss://offchain.pub',
'wss://nos.lol',
'wss://relay.damus.io',
],
{
encode(value) {
return JSON.stringify(value);
},
decode(value) {
return JSON.parse(value);
},
}
);