import React, { useEffect, useState } from "react"; import Modal from "./Modal"; import useModalStore from "../store/modal"; interface IRelevantExpCard { image: string; name: string; location: string; video?: string; logo: string; platforms: string[]; // touchscreen, vr, mobile } function RelevantExpCard({ image, name, location, video, logo, platforms, }: IRelevantExpCard) { const [modalComponent, setModalComponent] = useModalStore((state) => [ state.component, state.setComponent, ]); function handleClick() { if (video) { setModalComponent( ); } } return (
{platforms.map((platform, index) => (
{platform === "touchscreen" && ( )} {platform === "vr" && ( )} {platform === "mobile" && ( )}
))}

{name}

{location}

); } export default RelevantExpCard;