Showing error modal when clicking hotspot toggle on Docker.

This commit is contained in:
Roland 2022-10-22 14:27:18 -06:00
parent 1230a3056d
commit d28797326b
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
6 changed files with 178 additions and 56 deletions

View file

@ -10,7 +10,6 @@ import {
getDownloaders,
getDownloads,
getFiles,
getHotspotStatus,
getInventory,
getSettings,
getStatistics,
@ -462,6 +461,8 @@ export const useBrowseFiles = () => {
export const useHotspot = () => {
const [on, setOn] = useState(null);
const {status} = useContext(StatusContext);
// Hotspot is unsupported on Docker.
const {dockerized} = status;
useEffect(() => {
if (status && status['hotspot_status']) {
@ -481,7 +482,7 @@ export const useHotspot = () => {
await setHotspot(on);
}
return {on, setOn, setHotspot: localSetHotspot};
return {on, setOn, setHotspot: localSetHotspot, dockerized};
}
export const useDownloads = () => {