mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-22 12:41:10 +10:00
fix: lint
This commit is contained in:
@ -47,7 +47,9 @@ import { XMarkIcon } from "@heroicons/vue/24/solid";
|
|||||||
import type { SerializeObject } from "nitropack";
|
import type { SerializeObject } from "nitropack";
|
||||||
import type { NotificationModel } from "~/prisma/client/models";
|
import type { NotificationModel } from "~/prisma/client/models";
|
||||||
|
|
||||||
const props = defineProps<{ notification: SerializeObject<NotificationModel> }>();
|
const props = defineProps<{
|
||||||
|
notification: SerializeObject<NotificationModel>;
|
||||||
|
}>();
|
||||||
|
|
||||||
async function deleteMe() {
|
async function deleteMe() {
|
||||||
await $dropFetch(`/api/v1/notifications/:id`, {
|
await $dropFetch(`/api/v1/notifications/:id`, {
|
||||||
|
|||||||
@ -49,5 +49,7 @@
|
|||||||
import type { SerializeObject } from "nitropack";
|
import type { SerializeObject } from "nitropack";
|
||||||
import type { NotificationModel } from "~/prisma/client/models";
|
import type { NotificationModel } from "~/prisma/client/models";
|
||||||
|
|
||||||
const props = defineProps<{ notifications: Array<SerializeObject<NotificationModel>> }>();
|
const props = defineProps<{
|
||||||
|
notifications: Array<SerializeObject<NotificationModel>>;
|
||||||
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -4,7 +4,10 @@ import type { NotificationModel } from "~/prisma/client/models";
|
|||||||
const ws = new WebSocketHandler("/api/v1/notifications/ws");
|
const ws = new WebSocketHandler("/api/v1/notifications/ws");
|
||||||
|
|
||||||
export const useNotifications = () =>
|
export const useNotifications = () =>
|
||||||
useState<Array<SerializeObject<NotificationModel>>>("notifications", () => []);
|
useState<Array<SerializeObject<NotificationModel>>>(
|
||||||
|
"notifications",
|
||||||
|
() => [],
|
||||||
|
);
|
||||||
|
|
||||||
ws.listen((e) => {
|
ws.listen((e) => {
|
||||||
const notification = JSON.parse(e) as SerializeObject<NotificationModel>;
|
const notification = JSON.parse(e) as SerializeObject<NotificationModel>;
|
||||||
|
|||||||
@ -26,7 +26,6 @@
|
|||||||
<TrashIcon class="size-4" />
|
<TrashIcon class="size-4" />
|
||||||
{{ $t("account.notifications.clear") }}
|
{{ $t("account.notifications.clear") }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p
|
<p
|
||||||
|
|||||||
Reference in New Issue
Block a user