diff --git a/reminder-dashboard/src/components/Reminder/Settings.tsx b/reminder-dashboard/src/components/Reminder/Settings.tsx index 463c300..ac151fa 100644 --- a/reminder-dashboard/src/components/Reminder/Settings.tsx +++ b/reminder-dashboard/src/components/Reminder/Settings.tsx @@ -1,8 +1,7 @@ import { ChannelSelector } from "./ChannelSelector"; -import { DateTime } from "luxon"; import { IntervalSelector } from "./IntervalSelector"; import { useQuery } from "react-query"; -import { fetchUserInfo } from "../../api"; +import { fetchGuildInfo, fetchUserInfo } from "../../api"; import { useReminder } from "./ReminderContext"; import { Attachment } from "./Attachment"; import { TTS } from "./TTS"; @@ -11,11 +10,12 @@ import { useGuild } from "../App/useGuild"; export const Settings = () => { const guild = useGuild(); - const { isSuccess: userFetched, data: userInfo } = useQuery(fetchUserInfo()); + const { isSuccess: userFetched, data: userInfo } = useQuery({ ...fetchUserInfo() }); + const { isSuccess: guildFetched, data: guildInfo } = useQuery({ ...fetchGuildInfo(guild) }); const [reminder, setReminder] = useReminder(); - if (!userFetched) { + if (!userFetched || !guildFetched) { return <>>; } @@ -59,7 +59,13 @@ export const Settings = () => {