Skip to content

Commit

Permalink
Fix Navigation Section Image (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mfigueira authored Jun 11, 2024
1 parent 8d95db0 commit f121d83
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/shared/components/SectionTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import clsx from "clsx";
import Image from "next/image";
import { useMemo } from "react";

import { basePath } from "~/lib/app.constants";

import { PrimaryLink } from "./Link";

export type SectionTitleLink = {
Expand Down Expand Up @@ -46,7 +48,9 @@ export const SectionTitle: React.FC<SectionTitleProps> = ({
return (
<div className="h-full flex flex-col justify-between gap-6">
<div className="flex items-center flex-grow relative">
{navImgUrl && <Image src={navImgUrl} alt={title} layout="fill" objectFit="contain" className="!m-0" />}
{navImgUrl && (
<Image src={`${basePath}${navImgUrl}`} alt={title} layout="fill" objectFit="contain" className="!m-0" />
)}
</div>

{titleComponent}
Expand Down

0 comments on commit f121d83

Please sign in to comment.