mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-30 03:46:29 -05:00
Showing error modal when clicking hotspot toggle on Docker.
This commit is contained in:
parent
1230a3056d
commit
d28797326b
6 changed files with 178 additions and 56 deletions
|
|
@ -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 = () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue