mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 19:39:11 +00:00
fix(picker): uncache on role updates
This commit is contained in:
parent
2d88c4bf23
commit
c1e0e65823
1 changed files with 2 additions and 1 deletions
|
@ -20,7 +20,7 @@ const Picker = (props: PickerProps) => {
|
|||
const { session, authedFetch, isAuthenticated } = useSessionContext();
|
||||
const { pushRecentGuild } = useRecentGuilds();
|
||||
const appShellProps = useAppShellProps();
|
||||
const { getFullGuild } = useGuildContext();
|
||||
const { getFullGuild, uncacheGuild } = useGuildContext();
|
||||
|
||||
const [pickerData, setPickerData] = React.useState<PresentableGuild | null | false>(
|
||||
null
|
||||
|
@ -93,6 +93,7 @@ const Picker = (props: PickerProps) => {
|
|||
transactions: makeRoleTransactions(pickerData.member.roles, submittedRoles),
|
||||
};
|
||||
|
||||
uncacheGuild(props.serverID);
|
||||
const response = await authedFetch(`/update-roles/${props.serverID}`, {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify(updatePayload),
|
||||
|
|
Loading…
Add table
Reference in a new issue