added more hooks

This commit is contained in:
subnub
2024-06-22 03:46:42 -04:00
parent ecca46c73e
commit 4cccd43677
11 changed files with 430 additions and 357 deletions
+11 -2
View File
@@ -13,8 +13,11 @@ import { useFiles } from "../../hooks/files";
import { useFolders } from "../../hooks/folders";
const DataForm = (props) => {
const params = useParams();
const { data: files, fetchNextPage: filesFetchNextPage } = useFiles();
const {
data: files,
fetchNextPage: filesFetchNextPage,
invalidateFilesCache,
} = useFiles();
const { data: folders } = useFolders();
return (
@@ -39,6 +42,12 @@ const DataForm = (props) => {
>
Next page
</button>
<button
className="p-2 bg-blue-500 rounded-md text-white ml-4"
onClick={invalidateFilesCache}
>
Refresh
</button>
<div
className={
props.parent === "/"