Skip to content

Commit

Permalink
implement communityHealth route
Browse files Browse the repository at this point in the history
  • Loading branch information
zuies committed Jul 13, 2023
1 parent 57bba6b commit 85d1621
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 36 deletions.
48 changes: 13 additions & 35 deletions src/components/layouts/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {

import { useRouter } from 'next/router';
import Link from 'next/link';
import { Tooltip, Typography } from '@mui/material';
import useAppStore from '../../store/useStore';
import { StorageService } from '../../services/StorageService';
import { IUser } from '../../utils/types';
Expand Down Expand Up @@ -54,7 +53,7 @@ const Sidebar = () => {
},
{
name: 'Community Health',
path: '/community-health',
path: '/communityHealth',
icon: (
<FontAwesomeIcon
icon={faHeartPulse}
Expand All @@ -76,39 +75,18 @@ const Sidebar = () => {

const menuItem = menuItems.map((el) => (
<li key={el.name} className="py-4">
{el.path === '/community-health' ? (
<>
<Tooltip
title={<Typography fontSize={14}>Coming soon</Typography>}
arrow
placement="right"
>
<div
className={
currentRoute === el.path
? 'py-2 rounded-xl text-center bg-white hover:bg-white ease-in delay-75 cursor-pointer'
: 'py-2 rounded-xl text-center hover:bg-white ease-in delay-75 cursor-pointer'
}
>
{el.icon}
</div>
</Tooltip>
<p className="text-center text-sm">{el.name}</p>
</>
) : (
<Link href={el.path}>
<div
className={
currentRoute === el.path
? 'py-2 rounded-xl text-center bg-white hover:bg-white ease-in delay-75 cursor-pointer'
: 'py-2 rounded-xl text-center hover:bg-white ease-in delay-75 cursor-pointer'
}
>
{el.icon}
</div>
<p className="text-center text-sm">{el.name}</p>
</Link>
)}
<Link href={el.path}>
<div
className={
currentRoute === el.path
? 'py-2 rounded-xl text-center bg-white hover:bg-white ease-in delay-75 cursor-pointer'
: 'py-2 rounded-xl text-center hover:bg-white ease-in delay-75 cursor-pointer'
}
>
{el.icon}
</div>
<p className="text-center text-sm">{el.name}</p>
</Link>
</li>
));

Expand Down
2 changes: 1 addition & 1 deletion src/components/layouts/xs/SidebarXs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const Sidebar = () => {
},
{
name: 'Community Health',
path: '/t',
path: '/communityHealth',
icon: (
<FontAwesomeIcon
icon={faHeartPulse}
Expand Down
10 changes: 10 additions & 0 deletions src/pages/communityHealth.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import { defaultLayout } from '../layouts/defaultLayout';

function communityHealth() {
return <div>communityHealth</div>;
}

communityHealth.pageLayout = defaultLayout;

export default communityHealth;

0 comments on commit 85d1621

Please sign in to comment.