fixed Country uodated

This commit is contained in:
rockyeverlast
2025-07-10 18:53:44 +05:30
parent 897572c1f1
commit a8a0e2ffef
2 changed files with 3 additions and 2 deletions

View File

@@ -155,7 +155,7 @@ const Country = () => {
onChange={handleSearchChange}
/>
{/* <Button bgColor={'#EEEEEE'} pl={3} pr={3}><IoMdAdd /> <Text>Add</Text></Button> */}
<CountryAddModel />
<CountryAddModel refetch={refetch} />
</HStack>
</HStack>
<DataTable

View File

@@ -6,7 +6,7 @@ import { useEffect, useState } from "react";
import { PostCountry, useCreateCountryPostMutation } from "../../../Redux/Service/country.master";
import { Toaster, toaster } from "../../../components/ui/toaster";
function CountryAddModel() {
function CountryAddModel({refetch}: { refetch: VoidFunction }) {
const [createCountryPost] = useCreateCountryPostMutation()
const [isOpen, setIsOpen] = useState(false);
const [countryName, setCountryName] = useState<PostCountry>({
@@ -66,6 +66,7 @@ function CountryAddModel() {
type: "success",
});
setIsOpen(false);
refetch();
} else {
toaster.create({
title: "Error",