+ router.push("/workspace/" + file._id)}
+ >
+ {file.fileName}
+ |
+ router.push("/workspace/" + file._id)}
+ >
+ {file.createdBy}
+ |
+ router.push("/workspace/" + file._id)}
+ >
+ {file.readBy && file.readBy.includes(user.email) && Read}
+ {file.writtenBy && file.writtenBy.includes(user.email) && Write}
+ {!file.readBy && !file.writtenBy && No Access}
+ |
+
+
+
+ {/*
+ {pathname === "/dashboard" && (
+ onArchive(e, file._id)}
+ />
+ )}
+ {pathname === "/dashboard/archive" && (
+ onUnarchive(e, file._id)}
+ buttonVariant="destructive"
+ />
+ )}
+ onDelete(e, file._id)}
+ buttonVariant="destructive"
+ /> */}
+ |
+
+);
+
+function FileList({
+ fileList,
+ user
+}: {
+ fileList?: FILE[];
+ user:any;
+}) {
+ const router = useRouter();
+ const convex = useConvex();
+ const [sortConfig, setSortConfig] = useState<{
+ key: keyof FILE;
+ direction: string;
+ } | null>(null);
+ const [isSmallScreen, setIsSmallScreen] = useState(false);
+ const [isSubmitted, setIsSubmitted] = useState(false);
+ const [authorData, setAuthorData] = useState