{"size": 444, "ext": "js", "max_stars_repo_path": "src/context/context.js", "max_stars_repo_name": "uptheirons78/studio-barberio", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/context/context.js", "max_issues_repo_name": "uptheirons78/studio-barberio", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/context/context.js", "max_forks_repo_name": "uptheirons78/studio-barberio", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.76, "max_line_length": 60, "alphanum_fraction": 0.6126126126}
import React from "react";

const AppContext = React.createContext();

const AppProvider = ({ children }) => {
  const [isSidebarOpen, setSidebar] = React.useState(false);

  const handleSidebar = () => {
    setSidebar(!isSidebarOpen);
  };

  return (
    <AppContext.Provider
      value={{
        handleSidebar,
        isSidebarOpen,
      }}
    >
      {children}
    </AppContext.Provider>
  );
};

export { AppProvider, AppContext };
