Spaces:
Running
Running
Disable deduping in Directory. Playwright is super fast.
Browse files
lynxkite-app/web/src/Directory.tsx
CHANGED
|
@@ -23,7 +23,9 @@ const fetcher = (url: string) => fetch(url).then((res) => res.json());
|
|
| 23 |
export default function () {
|
| 24 |
const { path } = useParams();
|
| 25 |
const encodedPath = encodeURIComponent(path || "");
|
| 26 |
-
const list = useSWR(`/api/dir/list?path=${encodedPath}`, fetcher
|
|
|
|
|
|
|
| 27 |
const navigate = useNavigate();
|
| 28 |
const [isCreatingDir, setIsCreatingDir] = useState(false);
|
| 29 |
const [isCreatingWorkspace, setIsCreatingWorkspace] = useState(false);
|
|
|
|
| 23 |
export default function () {
|
| 24 |
const { path } = useParams();
|
| 25 |
const encodedPath = encodeURIComponent(path || "");
|
| 26 |
+
const list = useSWR(`/api/dir/list?path=${encodedPath}`, fetcher, {
|
| 27 |
+
dedupingInterval: 0,
|
| 28 |
+
});
|
| 29 |
const navigate = useNavigate();
|
| 30 |
const [isCreatingDir, setIsCreatingDir] = useState(false);
|
| 31 |
const [isCreatingWorkspace, setIsCreatingWorkspace] = useState(false);
|