uodate #2
30
src/Constants/Constaants.tsx
Normal file
30
src/Constants/Constaants.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
export const getTitle = (loactions:string) =>{
|
||||
|
||||
if (loactions==='/') {
|
||||
return 'Dashboard'
|
||||
}else if (loactions==='/register-user') {
|
||||
return 'Manage User - Register User'
|
||||
} else if (loactions==='/deactivate-accounts') {
|
||||
return 'Manage User - Deactivated User'
|
||||
} else if (loactions==='/manage-post') {
|
||||
return 'Manage Post'
|
||||
} else if (loactions==='/manage-sub-admin') {
|
||||
return 'Manage Sub Admin'
|
||||
} else if (loactions==='/manage-jobs') {
|
||||
return 'Manage Jobs'
|
||||
} else if (loactions==='/manage-contact-us') {
|
||||
return 'Manage Contact Us'
|
||||
} else if (loactions==='/manage-contact-us') {
|
||||
return 'Manage Contact Us'
|
||||
}else if (loactions==='/faq') {
|
||||
return 'Manage CMS - FAQ'
|
||||
}else if (loactions==='/about-us') {
|
||||
return 'Manage CMS - About Us'
|
||||
}else if (loactions==='/privacy-policy') {
|
||||
return 'Manage CMS - Privacy Policy'
|
||||
}else if (loactions==='/terms-and-condition') {
|
||||
return 'Manage CMS - Tems And Condition'
|
||||
}else if (loactions==='/profile') {
|
||||
return 'My Profile'
|
||||
}
|
||||
}
|
||||
@@ -6,10 +6,14 @@ import { nav } from "../Routes/Nav";
|
||||
import logo from '../assets/logo.svg';
|
||||
import { AccordionItem, AccordionItemContent, AccordionItemTrigger, AccordionRoot } from "../components/ui/accordion";
|
||||
import { Avatar } from "../components/ui/avatar";
|
||||
import { getTitle } from "../Constants/Constaants";
|
||||
|
||||
const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => {
|
||||
const navigate = useNavigate()
|
||||
const location = useLocation()
|
||||
const headerTitle = getTitle(location?.pathname)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +37,9 @@ const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => {
|
||||
</VStack>
|
||||
</VStack>
|
||||
<VStack gap={0} h="100%" w="85%" >
|
||||
<HStack h={'6%'} w={'100%'} justifyContent={'flex-end'} pe={3} gap={6}>
|
||||
<HStack h={'6.5%'} w={'100%'} justifyContent={'space-between'} pe={3} gap={6}>
|
||||
<Text fontSize={'sm'} ms={1} fontWeight={600} color={'#013e3e'}>{headerTitle}</Text>
|
||||
<HStack justifyContent={'center'}>
|
||||
<RiNotificationLine color="#013e3e" cursor={'pointer'} style={{ fontSize: '22px' }} />
|
||||
<HStack cursor={'pointer'} onClick={() => navigate('/profile')} >
|
||||
<Avatar size={'sm'} src="https://i.pinimg.com/736x/d6/cd/0f/d6cd0ffd4634b0763d3958a7325ce26e.jpg" />
|
||||
@@ -42,6 +48,7 @@ const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => {
|
||||
<Text fontSize={'xs'} >ritesh.pandey@wdimails.com</Text>
|
||||
</VStack>
|
||||
</HStack>
|
||||
</HStack>
|
||||
</HStack>
|
||||
{children}
|
||||
</VStack>
|
||||
|
||||
11
src/Pages/ManageCMS/AboutUs/AboutUs.tsx
Normal file
11
src/Pages/ManageCMS/AboutUs/AboutUs.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import MainFrame from '../../../components/MainFrame'
|
||||
|
||||
const AboutUs = () => {
|
||||
return (
|
||||
<MainFrame>
|
||||
|
||||
</MainFrame>
|
||||
)
|
||||
}
|
||||
|
||||
export default AboutUs
|
||||
12
src/Pages/ManageCMS/FAQ/FreqAskQuestion.tsx
Normal file
12
src/Pages/ManageCMS/FAQ/FreqAskQuestion.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Text } from '@chakra-ui/react'
|
||||
import MainFrame from '../../../components/MainFrame'
|
||||
|
||||
const FreqAskQuestion = () => {
|
||||
return (
|
||||
<MainFrame>
|
||||
<Text>hello</Text>
|
||||
</MainFrame>
|
||||
)
|
||||
}
|
||||
|
||||
export default FreqAskQuestion
|
||||
11
src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
Normal file
11
src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import MainFrame from '../../../components/MainFrame'
|
||||
|
||||
const PrivacyPolicy = () => {
|
||||
return (
|
||||
<MainFrame>
|
||||
|
||||
</MainFrame>
|
||||
)
|
||||
}
|
||||
|
||||
export default PrivacyPolicy
|
||||
11
src/Pages/ManageCMS/TermsAndCondition/TermsAndCondition.tsx
Normal file
11
src/Pages/ManageCMS/TermsAndCondition/TermsAndCondition.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import MainFrame from '../../../components/MainFrame'
|
||||
|
||||
const TermsAndCondition = () => {
|
||||
return (
|
||||
<MainFrame>
|
||||
|
||||
</MainFrame>
|
||||
)
|
||||
}
|
||||
|
||||
export default TermsAndCondition
|
||||
11
src/Pages/ManageContactUs/ManageContactUs.tsx
Normal file
11
src/Pages/ManageContactUs/ManageContactUs.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import MainFrame from '../../components/MainFrame'
|
||||
|
||||
const ManageContactUs = () => {
|
||||
return (
|
||||
<MainFrame>
|
||||
|
||||
</MainFrame>
|
||||
)
|
||||
}
|
||||
|
||||
export default ManageContactUs
|
||||
@@ -1,9 +1,10 @@
|
||||
import { GoDotFill } from "react-icons/go";
|
||||
import { PiSuitcaseBold } from "react-icons/pi";
|
||||
import { RiSuitcase2Line } from "react-icons/ri";
|
||||
import { TbEdit, TbLayoutDashboard } from "react-icons/tb";
|
||||
import { TiUserAddOutline, TiUserOutline } from "react-icons/ti";
|
||||
import { CgWorkAlt } from "react-icons/cg";
|
||||
import { GoDotFill } from "react-icons/go";
|
||||
import { PiHeadphonesBold } from "react-icons/pi";
|
||||
import { RiUserSettingsLine } from "react-icons/ri";
|
||||
import { TbEdit, TbLayoutDashboard } from "react-icons/tb";
|
||||
import { TiDocumentText, TiUserAddOutline, TiUserOutline } from "react-icons/ti";
|
||||
|
||||
|
||||
|
||||
export const nav = [
|
||||
@@ -51,9 +52,44 @@ export const nav = [
|
||||
type:'single'
|
||||
},
|
||||
{
|
||||
title: "Manage Jobs",
|
||||
path: "/manage-jobs",
|
||||
Icon: CgWorkAlt,
|
||||
title: "Manage Contact Us",
|
||||
path: "/manage-contact-us",
|
||||
Icon: PiHeadphonesBold,
|
||||
type:'single'
|
||||
},
|
||||
|
||||
{
|
||||
title: "Manage CMS",
|
||||
path: "/faq",
|
||||
Icon: TiDocumentText,
|
||||
type:'multiple',
|
||||
children: [
|
||||
{
|
||||
title: "FAQ",
|
||||
path: "/faq",
|
||||
Icon: GoDotFill,
|
||||
},
|
||||
{
|
||||
title: "About Us",
|
||||
path: "/about-us",
|
||||
Icon: GoDotFill,
|
||||
},
|
||||
{
|
||||
title: "Privacy Policy",
|
||||
path: "/privacy-policy",
|
||||
Icon: GoDotFill,
|
||||
},
|
||||
{
|
||||
title: "Terms And Conditions",
|
||||
path: "/terms-and-condition",
|
||||
Icon: GoDotFill,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "My Profile",
|
||||
path: "/profile",
|
||||
Icon: RiUserSettingsLine,
|
||||
type:'single'
|
||||
},
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
|
||||
import Dashboard from "../Pages/Dashboard/Dashboard";
|
||||
import AboutUs from "../Pages/ManageCMS/AboutUs/AboutUs";
|
||||
import FreqAskQuestion from "../Pages/ManageCMS/FAQ/FreqAskQuestion";
|
||||
import PrivacyPolicy from "../Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy";
|
||||
import ManageContactUs from "../Pages/ManageContactUs/ManageContactUs";
|
||||
import ManageJobs from "../Pages/ManageJobs/ManageJobs";
|
||||
import ManagePost from "../Pages/ManagePost/ManagePost";
|
||||
import ManageSubAdmin from "../Pages/ManageSubAdmin/ManageSubAdmin";
|
||||
@@ -13,6 +17,25 @@ export const RouteLink = [
|
||||
{ path: "/manage-post", Component: ManagePost },
|
||||
{ path: "/manage-sub-admin", Component: ManageSubAdmin },
|
||||
{ path: "/manage-jobs", Component: ManageJobs },
|
||||
{ path: "/manage-contact-us", Component: ManageContactUs },
|
||||
{ path: "/faq", Component: FreqAskQuestion },
|
||||
|
||||
|
||||
|
||||
{ path: "/about-us", Component: AboutUs },
|
||||
|
||||
|
||||
|
||||
{ path: "/privacy-policy", Component: PrivacyPolicy },
|
||||
|
||||
|
||||
{ path: "/terms-and-condition", Component: PrivacyPolicy },
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Box, Text, VStack } from "@chakra-ui/react"
|
||||
import { Box, VStack } from "@chakra-ui/react"
|
||||
import { motion } from "framer-motion"
|
||||
import React, { FC } from "react"
|
||||
import { OPACITY_ON_LOAD } from "../Layouts/animations"
|
||||
@@ -11,9 +11,9 @@ interface MainFrameProps {
|
||||
title?: string
|
||||
}
|
||||
|
||||
const MainFrame: FC<MainFrameProps> = ({ children, title }) => {
|
||||
const MainFrame: FC<MainFrameProps> = ({ children }) => {
|
||||
return (
|
||||
<MotionVStack {...OPACITY_ON_LOAD} w="100%" h="97%" p={3} ps={1} pt={4} >
|
||||
<MotionVStack {...OPACITY_ON_LOAD} w="100%" h="94.5%" p={3} ps={1} pt={3} >
|
||||
<Box
|
||||
w="100%"
|
||||
h="100%"
|
||||
|
||||
Reference in New Issue
Block a user