import { useState } from "react";

const DashboardContext = createContext();
export const DashboardProvider = ({ children }) => {
  const [search, setSearch] = useState("");

  return (
    <DashboardContext.Provider value={{ search, setSearch }}>
      {children}
    </DashboardContext.Provider>
  );
};

export const useDashboard = () => useContext(DashboardContext);
