fixed Country uodated
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user