Skip to content

Commit

Permalink
fix: use navigate in v2 events
Browse files Browse the repository at this point in the history
  • Loading branch information
makelicious committed Dec 3, 2024
1 parent 29f1bed commit d0bfb84
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/client/src/v2-events/features/workqueues/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*
* Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS.
*/
import { push } from 'connected-react-router'

import React from 'react'

import {
Expand All @@ -29,10 +27,10 @@ import {
import { DeclarationIconSmall } from '@opencrvs/components/lib/icons/DeclarationIconSmall'
import { Plus } from '@opencrvs/components/src/icons'
import { V2_EVENTS_ROUTE } from '@client/v2-events/routes'
import { useDispatch } from 'react-redux'
import { useNavigate } from 'react-router-dom'

export const Workqueues = () => {
const dispatch = useDispatch()
const navigate = useNavigate()
return (
<Frame
navigation={
Expand Down Expand Up @@ -90,7 +88,7 @@ export const Workqueues = () => {
<Button
type="iconPrimary"
onClick={() => {
dispatch(push(V2_EVENTS_ROUTE))
navigate(V2_EVENTS_ROUTE)
}}
>
<Plus />
Expand Down

0 comments on commit d0bfb84

Please sign in to comment.