From cd5d27528cf183100fe157102b75c17459451ee6 Mon Sep 17 00:00:00 2001 From: Ekta Yadav Date: Mon, 1 Apr 2024 18:45:20 +0530 Subject: [PATCH] Task #216462 ,Task #216464 - design for footer and header --- .../src/components/layout/Footer.js | 130 ++++-------- .../src/components/layout/Layout.js | 2 +- packages/nulp_elite/src/components/Card.js | 10 +- packages/nulp_elite/src/components/Footer.js | 178 ++++++++-------- packages/nulp_elite/src/components/header.js | 38 +++- .../src/pages/search/ContentList.js | 162 ++------------- .../nulp_elite/src/pages/search/DomainList.js | 193 ++++-------------- packages/nulp_elite/src/styles/style.css | 34 ++- 8 files changed, 242 insertions(+), 505 deletions(-) diff --git a/packages/common-lib/src/components/layout/Footer.js b/packages/common-lib/src/components/layout/Footer.js index 72065dd4..7b5826e8 100644 --- a/packages/common-lib/src/components/layout/Footer.js +++ b/packages/common-lib/src/components/layout/Footer.js @@ -1,99 +1,39 @@ -import React, { useEffect } from 'react' -import { - Box, - Text, - HStack, - Center, - Stack, - Pressable, - VStack -} from 'native-base' -import IconByName from '../IconByName' -import { useTranslation } from 'react-i18next' -import { generatePath, useNavigate } from 'react-router-dom' -import { useWindowSize } from '../helper' +import * as React from 'react'; +import Box from '@mui/material/Box'; +import BottomNavigation from '@mui/material/BottomNavigation'; +import BottomNavigationAction from '@mui/material/BottomNavigationAction'; +import FavoriteIcon from '@mui/icons-material/Favorite'; +import SearchSharpIcon from '@mui/icons-material/SearchSharp'; +import GroupsOutlinedIcon from '@mui/icons-material/GroupsOutlined'; +import AccountCircleOutlinedIcon from '@mui/icons-material/AccountCircleOutlined'; +import EditNoteOutlinedIcon from '@mui/icons-material/EditNoteOutlined'; -export default function Footer({ menues, routeDynamics, ...props }) { - const path = window?.location?.pathname.toString() - const { t } = useTranslation() - const navigate = useNavigate() +const styles = { + BottomNavigation: { + width: '100%', + position: 'fixed', + bottom: 0, + }, +}; - const [width, Height] = useWindowSize() - const footerMenus = menues - - const PressableNew = ({ item, children, ...prop }) => { - return item?.route ? ( - { - navigate( - routeDynamics - ? generatePath(item.route, { ...{ id: item.id } }) - : item.route - ) - }} - > - {children} - - ) : ( - {children} - ) - } +export default function Footer() { + const [value, setValue] = React.useState(0); return ( - - -
- - {footerMenus?.map((item, index) => ( - - {Array.isArray(item?.selected) && - (item?.selected?.find((e) => path.startsWith(e) && e !== '/') || - item.selected.includes(path)) ? ( - - - - {t(item.title)} - - - ) : ( - - - - {t(item.title)} - - - )} - - ))} - -
-
- ) -} + + { + setValue(newValue); + }} + > + } /> + } /> + } /> + } /> + + + ); +} \ No newline at end of file diff --git a/packages/common-lib/src/components/layout/Layout.js b/packages/common-lib/src/components/layout/Layout.js index 8e602f15..c7b52fae 100644 --- a/packages/common-lib/src/components/layout/Layout.js +++ b/packages/common-lib/src/components/layout/Layout.js @@ -93,7 +93,7 @@ export default function Layout({ serRefFoot(e)}> -