mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 06:37:56 +01:00
Fix handler resolution issue.
This commit is contained in:
parent
4a04b60693
commit
89ce9f2a60
@ -20,7 +20,7 @@ import Paper from '@mui/material/Paper';
|
|||||||
|
|
||||||
const HistoryDialog = ({ mapId, onClose }: SimpleDialogProps): React.ReactElement => {
|
const HistoryDialog = ({ 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 { data } = useQuery<unknown, ErrorInfo, ChangeHistory[]>(`history-${mapId}`, () => {
|
const { data } = useQuery<unknown, ErrorInfo, ChangeHistory[]>(`history-${mapId}`, () => {
|
||||||
return client.fetchHistory(mapId);
|
return client.fetchHistory(mapId);
|
||||||
@ -28,11 +28,8 @@ const HistoryDialog = ({ mapId, onClose }: SimpleDialogProps): React.ReactElemen
|
|||||||
const changeHistory: ChangeHistory[] = data ? data : [];
|
const changeHistory: ChangeHistory[] = data ? data : [];
|
||||||
|
|
||||||
const handleOnClose = (): void => {
|
const handleOnClose = (): void => {
|
||||||
onClose();
|
|
||||||
|
|
||||||
// Invalidate cache ...
|
|
||||||
const queryClient = useQueryClient();
|
|
||||||
queryClient.invalidateQueries(`history-${mapId}`);
|
queryClient.invalidateQueries(`history-${mapId}`);
|
||||||
|
onClose();
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleOnClick = (event, vid: number): void => {
|
const handleOnClick = (event, vid: number): void => {
|
||||||
|
Loading…
Reference in New Issue
Block a user