Skip to content

Commit 13003b1

Browse files
committed
feat(web): add empty state to notifications list
1 parent fdd56ae commit 13003b1

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

web/components/Notifications/List.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import type { Importance, NotificationType } from "~/composables/gql/graphql";
77
import { useFragment } from "~/composables/gql/fragment-masking";
88
import { useQuery } from "@vue/apollo-composable";
99
import { vInfiniteScroll } from "@vueuse/components";
10+
import { CheckIcon } from "@heroicons/vue/24/solid";
1011
1112
/**
1213
* Page size is the max amount of items fetched from the api in a single request.
@@ -63,6 +64,13 @@ async function onLoadMore() {
6364
</script>
6465

6566
<template>
67+
<div
68+
v-if="notifications?.length === 0"
69+
class="h-full flex flex-col items-center justify-center gap-3"
70+
>
71+
<CheckIcon class="h-10 text-green-600" />
72+
No notifications to see here!
73+
</div>
6674
<!-- The horizontal padding here adjusts for the scrollbar offset -->
6775
<div
6876
v-if="notifications?.length > 0"

web/components/Notifications/Sidebar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import {
99
} from "@/components/shadcn/sheet";
1010
1111
import { archiveAllNotifications } from "./graphql/notification.query";
12-
import type { Importance} from "~/composables/gql/graphql";
13-
import { NotificationType } from "~/composables/gql/graphql";
12+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports -- false positive :(
13+
import { Importance, NotificationType } from "~/composables/gql/graphql";
1414
import { useMutation } from "@vue/apollo-composable";
1515
1616
const { mutate: archiveAll, loading: loadingArchiveAll } = useMutation(

0 commit comments

Comments
 (0)