fix: (regression 0.33.0) accessing protected folder not showing login dialog https://github.com/rejetto/hfs/issues/108
Massimo Melina committed
Feb 20, 2023 at 09:12 UTC
a71035952dba2ceb665b4141d27cd52e7f76adfe
1 file changed
+3
-2
frontend/src/BrowseFiles.ts
+3
-2
@@ -33,16 +33,17 @@ export type DirList = DirEntry[]
33
export function BrowseFiles() {
34
useFetchList()
35
const { error, list, serverConfig } = useSnapState()
36
+ const afterHead = useCustomCode('afterHead')
37
return useAuthorized() && h(Fragment, {},
38
h(Html, { code: serverConfig?.custom_header }),
39
h(Head),
39
- useCustomCode('afterHead'),
40
+ afterHead,
41
hError(error)
42
|| h(list ? FilesList : Spinner))
43
}
44
45
function FilesList() {
45
- const { filteredList, list, loading, stoppedSearch, can_upload, can_delete } = useSnapState()
46
+ const { filteredList, list, loading, stoppedSearch, can_upload } = useSnapState()
47
const midnight = useMidnight() // as an optimization we calculate this only once per list and pass it down
48
const pageSize = 100
49
const [page, setPage] = useState(0)