Skip to content

Commit

Permalink
feat: small updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gregfrasco committed Apr 18, 2024
1 parent ed26fd7 commit 2b14650
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
4 changes: 2 additions & 2 deletions packages/client/src/components/NavBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const NavBar = () => {
<ListItemButton
component={NavLink}
to={item.URL}
selected={pathname === item.URL}
selected={!item.Link.URL ? false : pathname === item.Link.URL}
target={item.Link.URL?.startsWith('http') ? '_blank' : null}
>
<ListItemText primary={item.Link.Name} />
Expand All @@ -73,7 +73,7 @@ export const NavBar = () => {
item.Subpages.length > 0 &&
item.Subpages.map((subitem) => (
<ListItem key={subitem.id} disablePadding sx={{ ml: 2 }}>
<ListItemButton component={NavLink} to={subitem.URL} selected={pathname === subitem.URL}>
<ListItemButton component={NavLink} to={subitem.URL}>
<ListItemText secondary={subitem.Name} />
</ListItemButton>
</ListItem>
Expand Down
10 changes: 3 additions & 7 deletions packages/client/src/components/Router.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ export const Router = ({ children }) => {
element: <Home />
},
{
path: 'about-old',
path: 'about',
element: <About />
},
{
path: 'treatments-and-services',
element: <TreatmentsServices />,
children: [
{
index: true,
index: 'services-to-the-health-system',
element: <ServicesToTheHealthSystem />
},
{
Expand All @@ -46,16 +46,12 @@ export const Router = ({ children }) => {
}
]
},
{
path: 'testimonials',
element: <Testimonials />
},
{
path: 'research-and-evaluation',
element: <ResearchAndEvals />
},
{
path: 'get-involved-old',
path: 'get-involved',
element: <GetInvolved />
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/components/TeamMember.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const TeamMember = ({ Name, Photo, Credentials, Pronouns, Languages, Role
</Typography>
<Grid container spacing={1}>
{EBPs.split(',').map((EBP) => (
<Grid item>
<Grid item key={EBP}>
<Chip sx={{ fontStyle: 'italic', fontWeight: 'bold' }} key={EBP} label={EBP} />
</Grid>
))}
Expand Down
3 changes: 0 additions & 3 deletions packages/client/src/gql.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export const GET_HOMEPAGE_CARDGRID = gql`
attributes {
CardGridCardData {
id
Index
Icon {
data {
attributes {
Expand Down Expand Up @@ -186,7 +185,6 @@ export const GET_TREATMENTS_CARDGRID = gql`
attributes {
CardGridCardData {
id
Index
Icon {
data {
attributes {
Expand Down Expand Up @@ -410,7 +408,6 @@ export const GET_GETINVOLVED_CARDGRID = gql`
attributes {
CardGridCardData {
id
Index
Icon {
data {
attributes {
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function HomepageInfoPanelTop() {
const { Title, Subtitle, Image, Icon, ButtonText, ButtonLink } = data.homePageInfoPanelTop.data.attributes.InfoPanelA;
const imgUrl = import.meta.env.VITE_STRAPI_URL + Image.data?.attributes.url;
const imgAlt = Image.data?.attributes.alternativeText;
const iconUrl = import.meta.env.VITE_STRAPI_URL + Icon.data?.attributes.url;
const iconUrl = Icon.data?.attributes.url ? import.meta.env.VITE_STRAPI_URL + Icon.data?.attributes.url : null;
const iconAlt = Icon.data?.attributes.alternativeText;

return (
Expand Down

0 comments on commit 2b14650

Please sign in to comment.