From 09883d6ca0e56c65284473319968406e33e93848 Mon Sep 17 00:00:00 2001 From: Noelia Date: Sun, 31 Mar 2024 16:55:01 +0200 Subject: [PATCH] feat: improvement algolia search, anchoring (#114) --- app/[menu]/[submenu]/page.tsx | 6 +++++- app/page.tsx | 1 + components/card/card-information.tsx | 7 +++++-- components/card/card.tsx | 16 ++++++++++++---- components/header/header.tsx | 11 ++++++++--- 5 files changed, 31 insertions(+), 10 deletions(-) diff --git a/app/[menu]/[submenu]/page.tsx b/app/[menu]/[submenu]/page.tsx index 220e32e..d2e9bd1 100644 --- a/app/[menu]/[submenu]/page.tsx +++ b/app/[menu]/[submenu]/page.tsx @@ -17,7 +17,11 @@ export default async function SubmenuPage({ params }: SubmenuPageProps) { return ( <> -
+
{data.pageItems.map(item => ( diff --git a/app/page.tsx b/app/page.tsx index 95c7e22..f404b9d 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -9,6 +9,7 @@ export default async function Home() { return ( <>
diff --git a/components/card/card-information.tsx b/components/card/card-information.tsx index a35cb8f..6581579 100644 --- a/components/card/card-information.tsx +++ b/components/card/card-information.tsx @@ -5,10 +5,13 @@ import { getConferenceInfo } from './utils/card-utils' type CardTitleProps = { title?: string infoExtra?: InfoExtra + href: string } -export const CardInformation = ({ title, infoExtra }: CardTitleProps) => ( +export const CardInformation = ({ title, infoExtra, href }: CardTitleProps) => (

- {infoExtra ? getConferenceInfo(infoExtra) : title} + + {infoExtra ? getConferenceInfo(infoExtra) : title} +

) diff --git a/components/card/card.tsx b/components/card/card.tsx index 901f9cd..f7fbd92 100644 --- a/components/card/card.tsx +++ b/components/card/card.tsx @@ -13,14 +13,22 @@ export const Card = ({ item }: CardProps) => { const { cover, imgPlaceholder, titleCard, infoExtra, links, videos } = item return ( -
+
<> -

- {imgPlaceholder}{' '} +

+ + {imgPlaceholder} +

- +
{links?.map(({ url, type }, index) => ( { +export const Header = ({ title, description, href }: HeaderProps) => { return (
-

- {title} +

+ + {title} +

{description.map((parrafo, index) => (