Ensure FlaggableElement has an empty list of labels in the messages views

This commit is contained in:
Keith Stevens
2023-01-10 14:16:19 +09:00
parent 54cc88bb1f
commit 48e9c7d09c
4 changed files with 15 additions and 5 deletions
@@ -1,4 +1,5 @@
import { useState } from "react";
import type { ValidLabel } from "src/components/Messages";
import fetcher from "src/lib/fetcher";
import poster from "src/lib/poster";
import useSWRImmutable from "swr/immutable";
@@ -10,6 +11,7 @@ export interface TaskResponse<TaskType> {
id: string;
userId: string;
task: TaskType;
valid_labels: ValidLabel[];
}
export const useGenericTaskAPI = <TaskType,>(taskApiEndpoint: string) => {