This commit is contained in:
parent
a743ebbfba
commit
aba2b8e5f0
@ -31,15 +31,7 @@ function RelayButton({ url, selected, onClick }: { url: string; selected: boolea
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const recommendedRelays = [
|
const defaultRelaySelection = new Set(["wss://relay.poster.place"]);
|
||||||
"wss://relay.damus.io",
|
|
||||||
"wss://welcome.nostr.wine",
|
|
||||||
"wss://nos.lol",
|
|
||||||
"wss://purplerelay.com",
|
|
||||||
"wss://nostr.bitcoiner.social",
|
|
||||||
"wss://nostr-pub.wellorder.net",
|
|
||||||
];
|
|
||||||
const defaultRelaySelection = new Set(["wss://relay.damus.io", "wss://nos.lol", "wss://welcome.nostr.wine"]);
|
|
||||||
|
|
||||||
export default function RelayStep({ onSubmit, onBack }: { onSubmit: (relays: string[]) => void; onBack: () => void }) {
|
export default function RelayStep({ onSubmit, onBack }: { onSubmit: (relays: string[]) => void; onBack: () => void }) {
|
||||||
const [relays, relayActions] = useSet<string>(defaultRelaySelection);
|
const [relays, relayActions] = useSet<string>(defaultRelaySelection);
|
||||||
@ -47,16 +39,10 @@ export default function RelayStep({ onSubmit, onBack }: { onSubmit: (relays: str
|
|||||||
return (
|
return (
|
||||||
<Flex gap="4" {...containerProps} maxW="8in">
|
<Flex gap="4" {...containerProps} maxW="8in">
|
||||||
<Heading size="lg" mb="2">
|
<Heading size="lg" mb="2">
|
||||||
Select some relays
|
Click Next to set our relay to wss://relay.poster.place
|
||||||
</Heading>
|
</Heading>
|
||||||
|
|
||||||
<SimpleGrid columns={[1, 1, 2]} spacing="4">
|
{relays.size === 0 && <Text color="orange">Click to set your relay to relay.poster.place. This relay will broadcast your notes to many relays for you.</Text>}
|
||||||
{recommendedRelays.map((url) => (
|
|
||||||
<RelayButton key={url} url={url} selected={relays.has(url)} onClick={() => relayActions.toggle(url)} />
|
|
||||||
))}
|
|
||||||
</SimpleGrid>
|
|
||||||
|
|
||||||
{relays.size === 0 && <Text color="orange">You must select at least one relay</Text>}
|
|
||||||
<Button
|
<Button
|
||||||
w="full"
|
w="full"
|
||||||
colorScheme="primary"
|
colorScheme="primary"
|
||||||
|
Loading…
Reference in New Issue
Block a user