diff --git a/src/index.css b/src/index.css index 2df06d0..c1f5198 100644 --- a/src/index.css +++ b/src/index.css @@ -4,6 +4,8 @@ :root { --background: #f7f7f7; --foreground: #181818; + --primary-light: #fff; + --primary-dark: #0a0a0a; --primary: #ffb700; --primary2: #ffc600; --secondary: #09237d; @@ -304,4 +306,4 @@ label { > label.ant-form-item-required::before { position: relative !important; top: 3px !important; -} +} \ No newline at end of file diff --git a/src/layouts/app/App.tsx b/src/layouts/app/App.tsx deleted file mode 100644 index 532f481..0000000 --- a/src/layouts/app/App.tsx +++ /dev/null @@ -1,231 +0,0 @@ -import { - LogoutOutlined, - QuestionOutlined, - SettingOutlined, - UserOutlined, -} from "@ant-design/icons"; -import { - Dropdown, - Flex, - FloatButton, - Layout, - MenuProps, - message, - theme, - Tooltip, - Typography, -} from "antd"; -import { ReactNode, useEffect, useRef, useState } from "react"; -import { useLocation, useNavigate } from "react-router-dom"; - -import dayjs from "dayjs"; -import { logout } from "features/auth/authSlice.ts"; -import { useTranslation } from "react-i18next"; -import { useAppDispatch } from "redux/hooks.ts"; -import { PATH_AUTH } from "utils/constants.ts"; -import LangSelect from "./components/langSelect/LangSelect.tsx"; -import HeaderNav from "./HeaderNav.tsx"; -import SideNav from "./SideNav.tsx"; -import "./styles.css"; - -const { Content } = Layout; -const { Title } = Typography; -type AppLayoutProps = { - withSidebar?: boolean; - children: ReactNode; -}; - -export const AppLayout = ({ children, withSidebar = true }: AppLayoutProps) => { - const dispatch = useAppDispatch(); - const { t } = useTranslation(); - const { - token: { borderRadius }, - } = theme.useToken(); - const [navFill, setNavFill] = useState(false); - const navigate = useNavigate(); - const nodeRef = useRef(null); - const floatBtnRef = useRef(null); - const location = useLocation(); - const isMenu = location.pathname === "/menu"; - - const items: MenuProps["items"] = [ - { - key: "user-profile-link", - label: t("profile"), - icon: , - }, - { - key: "user-settings-link", - label: t("settings"), - icon: , - }, - { - key: "user-help-link", - label: t("help center"), - icon: , - }, - { - type: "divider", - }, - { - key: "user-logout-link", - label: t("logout"), - icon: , - danger: true, - onClick: () => { - message.open({ - type: "loading", - content: t("msg-success-logout"), - }); - - dispatch(logout()); - - setTimeout(() => { - navigate(PATH_AUTH.signin); - }, 1000); - }, - }, - ]; - - useEffect(() => { - window.addEventListener("scroll", () => { - if (window.scrollY > 5) { - setNavFill(true); - } else { - setNavFill(false); - } - }); - }, []); - - return ( - <> - - {withSidebar && ( - - )} - - - - - - {dayjs().format("DD/MM/YYYY")}{" "} - - - - - - - - {/* - - */} - - - {/* -