From f2353aede0b97118572714a067177cde69cfd481 Mon Sep 17 00:00:00 2001 From: mahendar Date: Tue, 31 Dec 2024 19:21:59 +0530 Subject: [PATCH 1/3] updated image visibility --- components/PrimaryFeatures.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/PrimaryFeatures.jsx b/components/PrimaryFeatures.jsx index 67d6787..0c6abac 100644 --- a/components/PrimaryFeatures.jsx +++ b/components/PrimaryFeatures.jsx @@ -59,7 +59,7 @@ export function PrimaryFeatures() {
{/* - + {feature.title} @@ -135,7 +135,7 @@ export function PrimaryFeatures() { {feature.description}

-
+
Date: Tue, 7 Jan 2025 23:15:48 +0530 Subject: [PATCH 2/3] expanded images --- components/PrimaryFeatures.jsx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/components/PrimaryFeatures.jsx b/components/PrimaryFeatures.jsx index 0c6abac..cfb7e46 100644 --- a/components/PrimaryFeatures.jsx +++ b/components/PrimaryFeatures.jsx @@ -59,7 +59,7 @@ export function PrimaryFeatures() {
{/* Empowering Healthcare with Advanced Technology -

+

Explore the advanced capabilities of Care designed to enhance healthcare delivery and patient management. From real-time monitoring to comprehensive EMR support, our features are tailored @@ -135,7 +135,7 @@ export function PrimaryFeatures() { {feature.description}

-
+
- ); + return
; } From 3e03738adbaa8f9c58b56e279c3b27d064612c64 Mon Sep 17 00:00:00 2001 From: mahendar Date: Sun, 12 Jan 2025 13:34:03 +0530 Subject: [PATCH 3/3] added sliding for images --- ...rimaryFeatures.jsx => PrimaryFeatures.tsx} | 75 +++++++++++++------ pages/index.tsx | 3 +- 2 files changed, 53 insertions(+), 25 deletions(-) rename components/{PrimaryFeatures.jsx => PrimaryFeatures.tsx} (73%) diff --git a/components/PrimaryFeatures.jsx b/components/PrimaryFeatures.tsx similarity index 73% rename from components/PrimaryFeatures.jsx rename to components/PrimaryFeatures.tsx index cfb7e46..20b31e1 100644 --- a/components/PrimaryFeatures.jsx +++ b/components/PrimaryFeatures.tsx @@ -1,7 +1,7 @@ "use client"; -import { useEffect, useState } from "react"; -import Image from "next/image"; +import { useEffect, useState, ReactNode } from "react"; +import Image, { StaticImageData } from "next/image"; import { Tab, TabGroup, TabList, TabPanel, TabPanels } from "@headlessui/react"; import clsx from "clsx"; @@ -10,7 +10,13 @@ import screenshotDeviceIntegrations from "@/public/features/device.png"; import screenshotEMRCriticalCare from "@/public/features/emr.png"; import screenshotRealTimeMonitoring from "@/public/features/monitoring.png"; -const features = [ +type Feature = { + title: string; + description: string; + image: StaticImageData; +}; + +const features: Feature[] = [ { title: "EMR Support For Critical Care", description: @@ -38,16 +44,22 @@ const features = [ ]; export function PrimaryFeatures() { - let [tabOrientation, setTabOrientation] = useState("horizontal"); + const [tabOrientation, setTabOrientation] = useState< + "horizontal" | "vertical" + >("horizontal"); useEffect(() => { - let lgMediaQuery = window.matchMedia("(min-width: 1024px)"); + const lgMediaQuery = window.matchMedia("(min-width: 1024px)"); - function onMediaQueryChange({ matches }) { + const onMediaQueryChange = (event: MediaQueryListEvent) => { + const { matches } = event; setTabOrientation(matches ? "vertical" : "horizontal"); - } + }; - onMediaQueryChange(lgMediaQuery); + lgMediaQuery.addEventListener( + "change", + onMediaQueryChange as EventListener + ); lgMediaQuery.addEventListener("change", onMediaQueryChange); return () => { @@ -59,16 +71,8 @@ export function PrimaryFeatures() {
- {/* */}

@@ -82,12 +86,12 @@ export function PrimaryFeatures() {

- {({ selectedIndex }) => ( + {({ selectedIndex }: { selectedIndex: number }) => ( <> -
+
{features.map((feature, featureIndex) => (
- + {feature.title} @@ -126,7 +130,27 @@ export function PrimaryFeatures() { ))}
- + {/*Sliding card in Mobile view */} +
+ {features.map((feature, index) => ( +
+

+ {feature.title} +

+ {feature.title} +

{feature.description}

+
+ ))} +
+ {features.map((feature) => (
@@ -155,6 +179,11 @@ export function PrimaryFeatures() { ); } -function Container({ className, ...props }) { +type ContainerProps = { + className?: string; + children: ReactNode; +}; + +function Container({ className, ...props }: ContainerProps) { return
; } diff --git a/pages/index.tsx b/pages/index.tsx index c567e04..4e88b72 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -9,13 +9,13 @@ import { } from "@heroicons/react/20/solid"; import Image from "next/image"; import LoadVideoPlayer from "@/components/LoadVideoPlayer"; -import { PrimaryFeatures } from "@/components/PrimaryFeatures"; import { OpenAIHero } from "@/components/OpenAIHero"; import Head from "next/head"; import Link from "next/link"; import CommitLayout from "@/components/Commit/CommitLayout"; import Header from "@/components/header"; import Footer from "@/components/Footer"; +import { PrimaryFeatures } from "@/components/PrimaryFeatures"; const primaryFeatures = [ { @@ -147,7 +147,6 @@ type Banner = { href: string; }; export default function Home() { - const [banner, setBanner] = useState(null); return (