From ab9a81d9bb2584befbffbc7f6b24c77b2de796b5 Mon Sep 17 00:00:00 2001 From: Obrempong-1 Date: Tue, 3 Mar 2026 12:22:50 +0000 Subject: [PATCH] fixes --- components/events/EventDetail.tsx | 56 ++++++++++-------------------- components/home/ProvostSection.tsx | 50 +++++++++++++------------- hooks/useEventCollection.ts | 21 ----------- 3 files changed, 43 insertions(+), 84 deletions(-) diff --git a/components/events/EventDetail.tsx b/components/events/EventDetail.tsx index 8113da2..dc653f7 100644 --- a/components/events/EventDetail.tsx +++ b/components/events/EventDetail.tsx @@ -16,7 +16,7 @@ interface EventDetailProps { const EventDetail: React.FC = ({ event }) => { const [mapLoading, setMapLoading] = useState(true); - const { title, description, eventDate, eventImage, venue, onlineLink, eventImagesCollection } = event; + const { title, description, eventDate, eventImage, venue, onlineLink } = event; const dateObj = new Date(eventDate); const formattedDate = dateObj.toLocaleDateString("en-US", { @@ -83,7 +83,23 @@ const EventDetail: React.FC = ({ event }) => { p: ({ node, ...props }: any) =>

, ul: ({ node, ...props }: any) =>

    , ol: ({ node, ...props }: any) =>
      , - li: ({ node, ...props }: any) =>
    1. + li: ({ node, ...props }: any) =>
    2. , + img: ({ node, ...props }: any) => ( +
      +
      + +
      + {props.alt && ( +

      + {props.alt} +

      + )} +
      + ) }} > {description} @@ -91,42 +107,6 @@ const EventDetail: React.FC = ({ event }) => { - {/* Media Gallery Section */} - {eventImagesCollection && eventImagesCollection.items.length > 0 && ( -
      -
      -
      - -
      -

      Media & Gallery

      -
      -
      - {eventImagesCollection.items.map((asset, index) => ( -
      - {asset.description -
      - {asset.title && ( -
      -

      {asset.title}

      - {asset.description && ( -

      {asset.description}

      - )} -
      - )} -
      - ))} -
      -
      - )} - {/* Map Section */}
      diff --git a/components/home/ProvostSection.tsx b/components/home/ProvostSection.tsx index ec2610b..c24e4c1 100644 --- a/components/home/ProvostSection.tsx +++ b/components/home/ProvostSection.tsx @@ -32,13 +32,13 @@ const ProvostSection = () => { return (
      -
      +
      @@ -66,6 +66,29 @@ const ProvostSection = () => {

      Celebrating Excellence &
      Leadership at KNUST

      + +
      + {highlights.map((item, index) => ( + +
      + {item.icon} +
      +

      + {item.text} +

      +

      + {item.label} +

      +
      + ))} +
      {/* Content */} @@ -105,29 +128,6 @@ const ProvostSection = () => { {`Prof Nyarko has over one hundred (100) publications in peer-reviewed journals, conference proceedings, and technical reports.`}

      - -
      - {highlights.map((item, index) => ( - -
      - {item.icon} -
      -

      - {item.text} -

      -

      - {item.label} -

      -
      - ))} -
      diff --git a/hooks/useEventCollection.ts b/hooks/useEventCollection.ts index 22b2334..e24cfea 100644 --- a/hooks/useEventCollection.ts +++ b/hooks/useEventCollection.ts @@ -22,13 +22,6 @@ export interface EventItem { venueInPlainEnglish: string; onlineLink?: string; eventImage: EventImage; - eventImagesCollection?: { - items: { - title: string; - description: string; - url: string; - }[]; - }; } interface Props { @@ -56,13 +49,6 @@ const GET_EVENTS = gql` url description } - eventImagesCollection { - items { - title - description - url - } - } } } } @@ -87,13 +73,6 @@ const GET_EVENT_BY_SLUG = gql` url description } - eventImagesCollection { - items { - title - description - url - } - } } } }