Fix DM reminders trying to load guild data
This commit is contained in:
@ -11,12 +11,7 @@ enum Sort {
|
||||
}
|
||||
|
||||
export const UserReminders = () => {
|
||||
const {
|
||||
isSuccess,
|
||||
isFetching,
|
||||
isFetched,
|
||||
data: guildReminders,
|
||||
} = useQuery(fetchUserReminders());
|
||||
const { isSuccess, isFetching, isFetched, data: reminders } = useQuery(fetchUserReminders());
|
||||
|
||||
const [collapsed, setCollapsed] = useState(false);
|
||||
const [sort, setSort] = useState(Sort.Time);
|
||||
@ -85,7 +80,7 @@ export const UserReminders = () => {
|
||||
|
||||
<div id={"guildReminders"} className={isFetching ? "loading" : ""}>
|
||||
{isSuccess &&
|
||||
guildReminders
|
||||
reminders
|
||||
.sort((r1, r2) => {
|
||||
if (sort === Sort.Time) {
|
||||
return r1.utc_time > r2.utc_time ? 1 : -1;
|
||||
|
Reference in New Issue
Block a user