Skip to content

Commit

Permalink
feat: refetch keys after namespace changes
Browse files Browse the repository at this point in the history
  • Loading branch information
d-rita committed Dec 4, 2024
1 parent c863051 commit be5ca59
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/keys/keysTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
TableBody,
TableHead,
} from '@dhis2/ui'
import React, { useState } from 'react'
import React, { useEffect, useState } from 'react'
import { useNavigate, useParams } from 'react-router-dom'
import classes from '../../App.module.css'
import i18n from '../../locales'
Expand Down Expand Up @@ -44,6 +44,10 @@ const KeysTable = () => {
const [deleteKey, setDeleteKey] = useState('')
const [openModal, setOpenModal] = useState(false)

useEffect(() => {
refetch({ id: namespace })
}, [namespace])

const handleDeleteAction = async (key) => {
await engine.mutate({
type: 'delete',
Expand Down

0 comments on commit be5ca59

Please sign in to comment.