import { useLocation } from "react-router-dom";
import React from "react";
import { useGetAllBranch } from "../../api/branch";
import DataTable from "../../Layout/Dashboard/Table/DataTable";
import { useColumns } from "./useTableColumns";
import useSearchQuery from "../../api/utils/useSearchQuery";

const App: React.FC = () => {
  const [searchQuery] = useSearchQuery("name");

  const response = useGetAllBranch({
    name: searchQuery,
    pagination: true,
  });

  return <DataTable response={response} useColumns={useColumns} />;
};

export default App;
