push rasad front on new repo

This commit is contained in:
2026-01-18 14:32:49 +03:30
commit 4fe6e70525
2139 changed files with 303150 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
import { createContext, useState } from "react";
import { PropTypes } from "prop-types";
import moment from "moment/moment";
export const AppContext = createContext();
export const AppContextProvider = (props) => {
const [notifState, setNotifState] = useState({
open: false,
vertical: "top",
horizontal: "center",
severity: "success",
msg: "",
});
const [selectedDate1, setSelectedDate1] = useState(
moment(new Date()).format("YYYY-MM-DD")
);
const [selectedDate2, setSelectedDate2] = useState(
moment(new Date()).format("YYYY-MM-DD")
);
const openNotif = (newState) => {
setNotifState({ open: true, ...newState });
};
return (
<AppContext.Provider
value={[
openNotif,
notifState,
selectedDate1,
setSelectedDate1,
selectedDate2,
setSelectedDate2,
]}
>
{props.children}
</AppContext.Provider>
);
};
AppContextProvider.propTypes = {
children: PropTypes.any,
};

View File

@@ -0,0 +1,24 @@
import { createContext, useState } from "react";
import { PropTypes } from "prop-types";
export const SidebarContext = createContext();
export const sidebarContextValues = {
sidebarState: false,
};
export const SidebarContextProvider = (props) => {
const [sideBarMobileState, setSidebarMobileState] = useState(false);
return (
<SidebarContext.Provider
value={[sideBarMobileState, setSidebarMobileState]}
>
{props.children}
</SidebarContext.Provider>
);
};
SidebarContextProvider.propTypes = {
children: PropTypes.any,
};