Commit 5ce47297 by Arjun Jhukal

updated the search filter for admin

parent 91cc1cd6
// "use client"; // "use client";
import { Box } from "@mui/material"; import { Box } from "@mui/material";
import OutlinedInput from "@mui/material/OutlinedInput"; import { SearchNormal } from "@wandersonalwes/iconsax-react";
import React from 'react' import React from 'react'
export default function AdminSearchBar() { export default function AdminSearchBar() {
return ( return (
<Box> <Box>
<OutlinedInput <div className="inpute__field relative">
name='search' <input type="search" placeholder="Ctrl + K" name="search" id="search" className="rounded-[4px] border-solid border-[1px] border-gray pl-5 outline-none focus:outline-primary-light" />
id='search' <SearchNormal color="#71717A" size={18} className="absolute left-2 top-1/2 transform -translate-y-1/2" />
placeholder='Ctrl + K' </div>
/>
</Box> </Box>
) )
} }
import { Box, IconButton } from '@mui/material' "use client";
import React from 'react'
// import AdminSearchBar from './AdminSearchBar'
import dynamic from "next/dynamic"; import { Box, IconButton, Input } from '@mui/material'
import React from 'react'
import { Add } from '@wandersonalwes/iconsax-react'; import { Add } from '@wandersonalwes/iconsax-react';
import NotificationPage from '../Notification'; import NotificationPage from '../Notification';
import Profile from '../Profile'; import Profile from '../Profile';
import AdminSearchBar from './AdminSearchBar';
const AdminSearchBar = dynamic(() => import("./AdminSearchBar"), { ssr: false });
export default function AdminHeader() { export default function AdminHeader() {
const [mounted, setMounted] = React.useState(false);
React.useEffect(() => {
setMounted(true);
}, []);
return ( return (
<Box className='flex items-center gap-4 jutify-content-between w-full'> <Box className='flex items-center gap-4 justify-between w-full'>
{/* <AdminSearchBar /> */} <AdminSearchBar />
<input type="text" /> {/* <Input /> */}
<div className="right flex items-center gap-4"> <div className="right flex items-center gap-4">
<IconButton <IconButton
color="inherit" color="inherit"
......
...@@ -13,7 +13,7 @@ export default function AdminMenu({ open }: { open: boolean }) { ...@@ -13,7 +13,7 @@ export default function AdminMenu({ open }: { open: boolean }) {
<ListItemButton <ListItemButton
className={[ className={[
open ? "expanded" : "collapsed", open ? "expanded" : "collapsed",
pathname.startsWith(PATH.DASHBOARD.ROOT) ? "active" : "" pathname === "/" ? "active" : ""
].join(" ")} ].join(" ")}
onClick={() => { router.push(PATH.DASHBOARD.ROOT) }} onClick={() => { router.push(PATH.DASHBOARD.ROOT) }}
......
...@@ -18,18 +18,18 @@ export const PATH = { ...@@ -18,18 +18,18 @@ export const PATH = {
}, },
ADMIN: { ADMIN: {
GAMES: { GAMES: {
ROOT: "admin/games", ROOT: "/admin/games",
ADD_GAME: { ADD_GAME: {
ROOT: "admin/games/add-game" ROOT: "/admin/games/add-game"
}, },
EDIT_GAME: { EDIT_GAME: {
ROOT: "admin/games/edit-game/:id" ROOT: "/admin/games/edit-game/:id"
} }
} }
}, },
USER: { USER: {
GAMES: { GAMES: {
ROOT: "user/games", ROOT: "/user/games",
} }
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment