small channels layout fix

This commit is contained in:
hzrd149
2024-04-18 09:18:56 -05:00
parent e09a9a4dbe
commit d3c307c1af

View File

@@ -1,6 +1,6 @@
import { useCallback } from "react"; import { useCallback } from "react";
import { kinds } from "nostr-tools"; import { kinds } from "nostr-tools";
import { Flex } from "@chakra-ui/react"; import { Flex, SimpleGrid } from "@chakra-ui/react";
import useTimelineLoader from "../../hooks/use-timeline-loader"; import useTimelineLoader from "../../hooks/use-timeline-loader";
import useSubject from "../../hooks/use-subject"; import useSubject from "../../hooks/use-subject";
@@ -43,11 +43,13 @@ function ChannelsHomePage() {
<PeopleListSelection /> <PeopleListSelection />
</Flex> </Flex>
<IntersectionObserverProvider callback={callback}> <IntersectionObserverProvider callback={callback}>
{channels.map((channel) => ( <SimpleGrid columns={{ base: 1, xl: 2 }} spacing="2">
<ErrorBoundary key={channel.id}> {channels.map((channel) => (
<ChannelCard channel={channel} additionalRelays={relays} /> <ErrorBoundary key={channel.id}>
</ErrorBoundary> <ChannelCard channel={channel} additionalRelays={relays} />
))} </ErrorBoundary>
))}
</SimpleGrid>
</IntersectionObserverProvider> </IntersectionObserverProvider>
</VerticalPageLayout> </VerticalPageLayout>
); );