diff --git a/src/routes/config/[guildId].tsx b/src/routes/config/[guildId].tsx index 741dcb3..831e143 100644 --- a/src/routes/config/[guildId].tsx +++ b/src/routes/config/[guildId].tsx @@ -148,7 +148,7 @@ const saveConfig = async ( return { success: true }; }; -function MyConfig() { +function config() { const params = useParams(); const navigator = useNavigate(); const location = useLocation(); @@ -201,7 +201,7 @@ function MyConfig() { }); const updateValues = createMemo(() => { - const guild = payload()?.guild; + const guild = !payload.loading && payload()?.guild; if (!guild) return {}; const data = config.features.timePlanning; const tpInterval = combineInterval( @@ -285,254 +285,257 @@ function MyConfig() { }); return ( -
General settings for this guild.
-General settings for this guild.
+Configure the features of the bot
+ setTimezoneRef(e)} - value={payload()?.guild.timezone} + hidden + type="checkbox" + id="timePlanning" + ref={(e) => setTpEnabledRef(e)} + checked={!!payload()?.guild.tpChannelId} onInput={(e) => setConfig( "features", "timePlanning", - "timezone", - e.target.value, + "enabled", + e.target.checked, ) } /> - - - -Configure the features of the bot
- - setTpEnabledRef(e)} - checked={!!payload()?.guild.tpChannelId} - onInput={(e) => - setConfig("features", "timePlanning", "enabled", e.target.checked) - } - /> -Enable pingable Roles:
+