From 7e9891face650066d6d9aa82ed3613f572b5c860 Mon Sep 17 00:00:00 2001 From: aelassas Date: Sat, 30 Nov 2024 07:43:56 +0100 Subject: [PATCH] Fix CreateLocation.tsx --- backend/src/pages/CreateLocation.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/src/pages/CreateLocation.tsx b/backend/src/pages/CreateLocation.tsx index 81335f5de..af495b405 100644 --- a/backend/src/pages/CreateLocation.tsx +++ b/backend/src/pages/CreateLocation.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react' -import { useNavigate } from 'react-router-dom' +// import { useNavigate } from 'react-router-dom' import { Input, InputLabel, @@ -25,7 +25,7 @@ import PositionInput from '@/components/PositionInput' import '@/assets/css/create-location.css' const CreateLocation = () => { - const navigate = useNavigate() + // const navigate = useNavigate() const [visible, setVisible] = useState(false) const [names, setNames] = useState([]) @@ -215,7 +215,8 @@ const CreateLocation = () => { if (image) { await LocationService.deleteTempImage(image) } - navigate('/locations') + // navigate('/locations') + window.location.href = '/locations' }} > {commonStrings.CANCEL}