This commit is contained in:
Manav Rathi
2025-02-28 13:24:21 +05:30
parent 28d412a12b
commit cea88b91d2
2 changed files with 15 additions and 9 deletions

View File

@@ -296,16 +296,17 @@ const FileViewer: React.FC<FileViewerProps> = ({
const isFavorite = useCallback(
({ file }: FileViewerAnnotatedFile) => {
if (!showModifyActions || !favoriteFileIDs) return undefined;
favoriteFileIDs.has(file.id);
return favoriteFileIDs.has(file.id);
},
[showModifyActions, favoriteFileIDs],
);
const toggleFavorite = useCallback(
({ file, annotation }: FileViewerAnnotatedFile) => {
async ({ file, annotation }: FileViewerAnnotatedFile) => {
if (!showModifyActions || !favoriteFileIDs)
throw new Error("Unexpected invocation");
await new Promise((r) => setTimeout(r, 7000));
console.log({ file, annotation });
// TODO
// const isFavorite = annotation.isFavorite;