Commit d9c1f963 by Arjun Jhukal

updated the minor change

parent 327bae5d
"use client"; "use client";
import { Box, IconButton, Input } from '@mui/material' import { useGetAllNotificationQuery } from '@/services/notificationApi';
import React from 'react' import { Box } from '@mui/material';
import { Add } from '@wandersonalwes/iconsax-react'; import React from 'react';
import CreatNewRecord from '../CreatNewRecord';
import NotificationPage from '../Notification'; import NotificationPage from '../Notification';
import Profile from '../Profile'; import Profile from '../Profile';
import AdminSearchBar from './AdminSearchBar';
import CreatNewRecord from '../CreatNewRecord';
import { useGetAllNotificationQuery } from '@/services/notificationApi';
export default function AdminHeader() { export default function AdminHeader() {
...@@ -18,7 +16,7 @@ export default function AdminHeader() { ...@@ -18,7 +16,7 @@ export default function AdminHeader() {
// }, []); // }, []);
const [pageIndex, setPageIndex] = React.useState(1); const [pageIndex, setPageIndex] = React.useState(1);
const [pageSize, setPageSize] = React.useState(10); const [pageSize, setPageSize] = React.useState(10);
const { data } = useGetAllNotificationQuery({ page: page, per_page: pageSize }); const { data } = useGetAllNotificationQuery({ pageIndex, pageSize });
return ( return (
<Box className='flex items-center gap-4 justify-end w-full'> <Box className='flex items-center gap-4 justify-end w-full'>
{/* <AdminSearchBar /> */} {/* <AdminSearchBar /> */}
......
...@@ -5,6 +5,7 @@ import { baseQuery } from "./baseQuery"; ...@@ -5,6 +5,7 @@ import { baseQuery } from "./baseQuery";
export const notificationApi = createApi({ export const notificationApi = createApi({
reducerPath: "notificationApi", reducerPath: "notificationApi",
baseQuery: baseQuery, baseQuery: baseQuery,
tagTypes: ['Notification', "Activity"], tagTypes: ['Notification', "Activity"],
endpoints: (builder) => ({ endpoints: (builder) => ({
......
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