From 748e33566b1fbc4b7bddcaeafb8d955ea610e7e9 Mon Sep 17 00:00:00 2001 From: jude Date: Mon, 19 Aug 2024 21:45:24 +0100 Subject: [PATCH] Fix patreon not sharing between guild members --- .../src/components/Reminder/Settings.tsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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 = () => {
-
+
Intervals available on Patreon{" "} or{" "}