mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-03-26 17:52:18 +01:00
fix scroll issue
This commit is contained in:
parent
cdccdccd33
commit
7c8f36e1d6
@ -53,7 +53,7 @@ export const DiscoverTab = () => {
|
||||
const timeline = events.filter(isNote);
|
||||
|
||||
return (
|
||||
<Flex direction="column" overflow="auto" gap="2">
|
||||
<Flex direction="column" gap="2">
|
||||
{timeline.map((event) => (
|
||||
<Note key={event.id} event={event} />
|
||||
))}
|
||||
|
@ -30,7 +30,7 @@ export const FollowingTab = () => {
|
||||
const timeline = showReplies ? events : events.filter(isNote);
|
||||
|
||||
return (
|
||||
<Flex direction="column" overflow="auto" gap="2">
|
||||
<Flex direction="column" gap="2">
|
||||
<FormControl display="flex" alignItems="center">
|
||||
<FormLabel htmlFor="show-replies" mb="0">
|
||||
Show Replies
|
||||
|
@ -32,40 +32,34 @@ export const GlobalTab = () => {
|
||||
const timeline = showReplies ? events : events.filter(isNote);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Flex direction="column" overflow="auto" gap="2">
|
||||
<Flex gap="2">
|
||||
<Select
|
||||
placeholder="All Relays"
|
||||
maxWidth="250"
|
||||
value={selectedRelay}
|
||||
onChange={(e) => {
|
||||
setSelectedRelay(e.target.value);
|
||||
loader.forgetEvents();
|
||||
}}
|
||||
>
|
||||
{availableRelays.map((url) => (
|
||||
<option key={url} value={url}>
|
||||
{url}
|
||||
</option>
|
||||
))}
|
||||
</Select>
|
||||
<FormControl display="flex" alignItems="center">
|
||||
<Switch id="show-replies" isChecked={showReplies} onChange={onToggle} mr="2" />
|
||||
<FormLabel htmlFor="show-replies" mb="0">
|
||||
Show Replies
|
||||
</FormLabel>
|
||||
</FormControl>
|
||||
</Flex>
|
||||
{timeline.map((event) => (
|
||||
<Note key={event.id} event={event} />
|
||||
))}
|
||||
{loading ? (
|
||||
<Spinner ml="auto" mr="auto" mt="8" mb="8" />
|
||||
) : (
|
||||
<Button onClick={() => loadMore()}>Load More</Button>
|
||||
)}
|
||||
<Flex direction="column" gap="2">
|
||||
<Flex gap="2">
|
||||
<Select
|
||||
placeholder="All Relays"
|
||||
maxWidth="250"
|
||||
value={selectedRelay}
|
||||
onChange={(e) => {
|
||||
setSelectedRelay(e.target.value);
|
||||
loader.forgetEvents();
|
||||
}}
|
||||
>
|
||||
{availableRelays.map((url) => (
|
||||
<option key={url} value={url}>
|
||||
{url}
|
||||
</option>
|
||||
))}
|
||||
</Select>
|
||||
<FormControl display="flex" alignItems="center">
|
||||
<Switch id="show-replies" isChecked={showReplies} onChange={onToggle} mr="2" />
|
||||
<FormLabel htmlFor="show-replies" mb="0">
|
||||
Show Replies
|
||||
</FormLabel>
|
||||
</FormControl>
|
||||
</Flex>
|
||||
</>
|
||||
{timeline.map((event) => (
|
||||
<Note key={event.id} event={event} />
|
||||
))}
|
||||
{loading ? <Spinner ml="auto" mr="auto" mt="8" mb="8" /> : <Button onClick={() => loadMore()}>Load More</Button>}
|
||||
</Flex>
|
||||
);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user