Skip to content

Commit

Permalink
feat: center "no notification" message
Browse files Browse the repository at this point in the history
  • Loading branch information
ledouxm committed Jan 30, 2022
1 parent ddf99e0 commit de3add1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/features/Notifications/Notifications.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Flex, Spinner, Stack } from "@chakra-ui/react";
import { Box, Center, Flex, Spinner, Stack } from "@chakra-ui/react";
import { useCallback, useEffect, useRef } from "react";
import { NotificationDto } from "../../types";
import { NotificationItem } from "./NotificationItem";
Expand All @@ -18,7 +18,9 @@ export const Notifications = () => {
<NotificationsFilters />
</Stack>
{notificationsQuery.isLoading ? (
<Spinner />
<Center w="100%">
<Spinner />
</Center>
) : (
<Stack ml="10px" overflowY="auto" height="100%" w="100%" overflowX="hidden">
{nbNewNotifications && nbNewNotifications > 0 && (
Expand Down Expand Up @@ -72,9 +74,9 @@ export const NotificationContent = ({
/>
))
) : (
<Box textAlign="center" mt="10px">
<Center w="100%" h="100%">
No notification
</Box>
</Center>
)}
</>
);
Expand Down

0 comments on commit de3add1

Please sign in to comment.