mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 14:47:56 +01:00
Fix share dialog cache issue
This commit is contained in:
parent
89ce9f2a60
commit
860e46d3ec
@ -34,6 +34,7 @@ type ShareModel = {
|
|||||||
const defaultModel: ShareModel = { emails: '', role: 'editor', message: '' };
|
const defaultModel: ShareModel = { emails: '', role: 'editor', message: '' };
|
||||||
const ShareDialog = ({ mapId, onClose }: SimpleDialogProps): React.ReactElement => {
|
const ShareDialog = ({ mapId, onClose }: SimpleDialogProps): React.ReactElement => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
const queryClient = useQueryClient();
|
||||||
const client: Client = useSelector(activeInstance);
|
const client: Client = useSelector(activeInstance);
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
@ -83,11 +84,10 @@ const ShareDialog = ({ mapId, onClose }: SimpleDialogProps): React.ReactElement
|
|||||||
);
|
);
|
||||||
|
|
||||||
const handleOnClose = (): void => {
|
const handleOnClose = (): void => {
|
||||||
|
// Invalidate cache ...
|
||||||
|
queryClient.invalidateQueries(`perm-${mapId}`);
|
||||||
onClose();
|
onClose();
|
||||||
|
|
||||||
// Invalidate cache ...
|
|
||||||
const queryClient = useQueryClient();
|
|
||||||
queryClient.invalidateQueries(`perm-${mapId}`);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleOnChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
|
const handleOnChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
|
||||||
|
Loading…
Reference in New Issue
Block a user