update title
This commit is contained in:
@ -75,7 +75,6 @@ const ManageMunicipiosProvider = ({ children }: { children: React.ReactNode }) =
|
||||
const [selectedMunicipios, setSelectedMunicipios] = useState<string | null>(null);
|
||||
const [municipios, setMunicipios] = useState<MunicipiosProps[]>([]);
|
||||
const { GetData } = useCallApi();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const handleSearchDialog = useCallback((show: boolean) => {
|
||||
setShowSearchDialog(show);
|
||||
@ -95,18 +94,13 @@ const ManageMunicipiosProvider = ({ children }: { children: React.ReactNode }) =
|
||||
setShowDeleteDialog(show);
|
||||
}, []);
|
||||
|
||||
const handleNavigate = (path: string) => {
|
||||
const url = navigate(`${API_URL}/municipios/postoadms/${path}`);
|
||||
console.log(url);
|
||||
};
|
||||
|
||||
const columns = useMemo<ColumnDef<any>[]>(
|
||||
() => [
|
||||
{
|
||||
// accessorFn: (row) => row.name,
|
||||
// id: 'name',
|
||||
accessorKey: 'name',
|
||||
header: ({ column }) => <DataGridColumnHeader title="Municipios Name" column={column} />,
|
||||
header: ({ column }) => <DataGridColumnHeader title="Municipio Name" column={column} />,
|
||||
enableSorting: true,
|
||||
enableHiding: false,
|
||||
meta: {
|
||||
@ -158,12 +152,6 @@ const ManageMunicipiosProvider = ({ children }: { children: React.ReactNode }) =
|
||||
order_direction: sorting[0].desc == false ? 'ASC' : 'DESC',
|
||||
filter: JSON.stringify(filter)
|
||||
});
|
||||
// console.log(response?.data);
|
||||
// const sortedList = response.data.data.list.sort((a: MunicipiosProps, b: MunicipiosProps) => {
|
||||
// if (a.name < b.name) return -1;
|
||||
// if (a.name > b.name) return 1;
|
||||
// return 0;
|
||||
// });
|
||||
setMunicipios(response?.data.list);
|
||||
return { data: response?.data.list, totalCount: response?.data.total_count };
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user