Skip to content

Commit

Permalink
fixes #6233
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Sep 13, 2023
1 parent 09373b6 commit c9f6054
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Components/Assets/AssetType/ONVIFCamera.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const ONVIFCamera = (props: ONVIFCameraProps) => {
const [refreshPresetsHash, setRefreshPresetsHash] = useState(
Number(new Date())
);
const [refreshHash, setRefreshHash] = useState(Number(new Date()));
const dispatch = useDispatch<any>();

useEffect(() => {
Expand Down Expand Up @@ -89,7 +90,7 @@ const ONVIFCamera = (props: ONVIFCameraProps) => {
Notification.Success({
msg: "Asset Configured Successfully",
});
window.location.reload();
setRefreshHash(Number(new Date()));
} else {
Notification.Error({
msg: "Something went wrong..!",
Expand Down Expand Up @@ -200,6 +201,7 @@ const ONVIFCamera = (props: ONVIFCameraProps) => {

{assetType === "ONVIF" ? (
<CameraConfigure
key={refreshHash}
asset={asset as AssetData}
bed={bed}
setBed={setBed}
Expand Down

0 comments on commit c9f6054

Please sign in to comment.