Skip to content

Commit

Permalink
fix: scrollbar
Browse files Browse the repository at this point in the history
  • Loading branch information
songkeys committed Aug 24, 2022
1 parent 8071ef5 commit 17d9cde
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions components/common/ConnectButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
LoadingOverlay,
Menu,
MenuItemProps,
ScrollArea,
Space,
Text,
} from "@mantine/core";
Expand Down Expand Up @@ -253,8 +254,12 @@ function AccountList() {
const hasNoResult = !isLoading && !data?.pages.some((page) => page.count > 0);

return (
<div className="max-h-50vh overflow-scroll">
<LoadingOverlay visible={isLoading} />
<ScrollArea.Autosize maxHeight="50vh">
{isLoading && (
<div className="h-100px">
<LoadingOverlay visible={isLoading} />
</div>
)}
{data?.pages.map((page, i) => (
<Fragment key={i}>
{page?.list.map((c) => (
Expand Down Expand Up @@ -342,7 +347,7 @@ function AccountList() {
<Text color="dimmed">No characters</Text>
</MenuItem>
)}
</div>
</ScrollArea.Autosize>
);
}

Expand Down

0 comments on commit 17d9cde

Please sign in to comment.