mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-13 17:05:47 +01:00
✨ Add new config format
Should be WAAAAY easier to work with modules now
This commit is contained in:
@@ -19,8 +19,9 @@ export default function PingComponent(props: any) {
|
||||
|
||||
const { url }: { url: string } = props;
|
||||
const [isOnline, setOnline] = useState<State>('loading');
|
||||
const exists = config.modules?.[PingModule.title]?.enabled ?? false;
|
||||
useEffect(() => {
|
||||
if (!config.settings.enabledModules.includes('Ping Services')) {
|
||||
if (!exists) {
|
||||
return;
|
||||
}
|
||||
axios
|
||||
@@ -32,7 +33,7 @@ export default function PingComponent(props: any) {
|
||||
setOnline('down');
|
||||
});
|
||||
}, []);
|
||||
if (!config.settings.enabledModules.includes('Ping Services')) {
|
||||
if (!exists) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user