|
| 1 | +"use client"; |
| 2 | +import RootLayout from "@/app/layout"; |
| 3 | +import CaseStudyCard from "@/components/caseStudyCard"; |
| 4 | +import Footer from "@/components/ui/footer"; |
| 5 | +import Image from "next/image"; |
| 6 | +import CaseStudySearch from "@/components/caseStudySearch"; |
| 7 | +import { useState } from "react"; |
| 8 | + |
| 9 | +const pageMetadata = { |
| 10 | + title: |
| 11 | + "Case Studies by Keploy | One-click API test with OpenSource and Free API Testing Tool", |
| 12 | + description: |
| 13 | + "Detailed case studies by Keploy about optimizing and testing using keploy API Tools. Learn how Keploy helps you automate API testing and improve code coverage", |
| 14 | + keywords: |
| 15 | + "API test, FREE API Testing Tool, API Testing tool, case studies, keploy case studies", |
| 16 | +}; |
| 17 | + |
| 18 | +const sampleCaseStudies = [ |
| 19 | + { |
| 20 | + title: "Read how Maruti Suzuki Managed to reduce their TAT by 50%", |
| 21 | + text: "Read how Maruti Suzuki Managed to reduce their TAT by 50%", |
| 22 | + imageUrl: "/images/gradient.png", |
| 23 | + tags: ["Maruti Suzuki", "TAT", "Reduction"], |
| 24 | + }, |
| 25 | + { |
| 26 | + title: |
| 27 | + "Read how Company X Increased productivity by 20% using Keploy API tests", |
| 28 | + text: "Read how Company X Increased productivity by 20%", |
| 29 | + imageUrl: "/images/gradient.png", |
| 30 | + tags: ["Company X", "Productivity", "Keploy API tests"], |
| 31 | + }, |
| 32 | + { |
| 33 | + title: "Read how Company Y Reduced their testing time by 30% using Keploy", |
| 34 | + text: "Read how Company Y Reduced their testing time by 30%", |
| 35 | + imageUrl: "/images/gradient.png", |
| 36 | + tags: ["Company Y", "Testing", "Keploy Testing"], |
| 37 | + }, |
| 38 | + { |
| 39 | + title: |
| 40 | + "Read how Company Z Improved their code coverage by 40% using Keploy", |
| 41 | + text: "Read how Company Z Improved their code coverage by 40%", |
| 42 | + imageUrl: "/images/gradient.png", |
| 43 | + tags: ["Company Z", "Code Coverage", "Keploy"], |
| 44 | + }, |
| 45 | + { |
| 46 | + title: "Read how Company A Reduced their testing time by 30% using Keploy", |
| 47 | + text: "Read how Company A Reduced their testing time by 30%", |
| 48 | + imageUrl: "/images/gradient.png", |
| 49 | + tags: ["Company A", "Testing", "Keploy"], |
| 50 | + }, |
| 51 | + { |
| 52 | + title: |
| 53 | + "Read how Company B Improved their code coverage by 40% using Keploy", |
| 54 | + text: "Read how Company B Improved their code coverage by 40%", |
| 55 | + imageUrl: "/images/gradient.png", |
| 56 | + tags: ["Company B", "Code Coverage", "Keploy"], |
| 57 | + }, |
| 58 | +]; |
| 59 | + |
| 60 | +export default function Home() { |
| 61 | + const [search, setSearch] = useState(""); |
| 62 | + const [tags, setTags] = useState([]); |
| 63 | + |
| 64 | + return ( |
| 65 | + <RootLayout metadata={pageMetadata}> |
| 66 | + <div className="overflow-x-clip relative flex flex-col items-center"> |
| 67 | + <Image |
| 68 | + src="/images/gradient-star.png" |
| 69 | + alt="" |
| 70 | + width={300} |
| 71 | + height={300} |
| 72 | + className="absolute left-[0%] top-[10svh] -z-10 max-w-[300px] max-h-[300px] w-[30vw] h-[30vw] animate-float" |
| 73 | + /> |
| 74 | + <div className="absolute right-[90%] md:right-[-10%] md:top-[35svh] top-[50svh] rounded-full overflow-clip aspect-square max-w-[300px] max-h-[300px] w-[30vw] h-[30vw] -z-10 drop-shadow-[0px_0px_50px_rgba(254,66,41,1)] animate-float"> |
| 75 | + <Image |
| 76 | + src="/images/gradient.png" |
| 77 | + alt="" |
| 78 | + width={700} |
| 79 | + height={400} |
| 80 | + className="-z-10 w-full h-full object-fill" |
| 81 | + /> |
| 82 | + </div> |
| 83 | + <div className="absolute right-[5%] top-[15svh] md:left-[-5%] md:top-[60svh] rounded-full overflow-clip aspect-square max-w-[200px] max-h-[200px] w-[20vw] h-[20vw] -z-10 drop-shadow-[0px_0px_50px_rgba(254,66,41,1)] animate-float"> |
| 84 | + <Image |
| 85 | + src="/images/gradient.png" |
| 86 | + alt="" |
| 87 | + width={700} |
| 88 | + height={400} |
| 89 | + className="-z-10 w-full h-full object-fill" |
| 90 | + /> |
| 91 | + </div> |
| 92 | + <div className=" flex flex-col h-[50svh] justify-end mb-10 items-start min-w-[60vw] mx-10 md:mx-auto overflow-x-clip max-w-[100vw]"> |
| 93 | + <div className="max-w-[80vw] px-4 sm:px-6 lg:px-8 mx-auto mb-10 flex-nowrap text-nowrap"> |
| 94 | + <a |
| 95 | + href="/newcasestudy" |
| 96 | + className="bg-[length:280%] bg-[url('/images/gradient.png')] bg-no-repeat bg-[100%] px-4 py-4 rounded-lg text-center" |
| 97 | + > |
| 98 | + <p className="me-2 inline-block text-white font-bold flex-shrink"> |
| 99 | + Latest Case Study by Keploy |
| 100 | + </p> |
| 101 | + <p className=" hidden sm:inline-flex py-2 px-3 items-center gap-x-2 text font-medium rounded-full underline underline-offset-8 text-white hover:underline-offset-2 transition-all"> |
| 102 | + Read now |
| 103 | + <svg |
| 104 | + className="shrink-0 size-4" |
| 105 | + xmlns="http://www.w3.org/2000/svg" |
| 106 | + width="24" |
| 107 | + height="24" |
| 108 | + viewBox="0 0 24 24" |
| 109 | + fill="none" |
| 110 | + stroke="currentColor" |
| 111 | + stroke-width="2" |
| 112 | + stroke-linecap="round" |
| 113 | + stroke-linejoin="round" |
| 114 | + > |
| 115 | + <path d="m9 18 6-6-6-6" /> |
| 116 | + </svg> |
| 117 | + </p> |
| 118 | + </a> |
| 119 | + </div> |
| 120 | + <h1 className="sm lg:text-5xl text-5xl font-extrabold leading-tighter tracking-tighter my-5 bg-clip-text text-left text-transparent bg-gradient-to-r from-gradient-300 to-gradient-400"> |
| 121 | + Case Studies |
| 122 | + </h1> |
| 123 | + <p className="text-left ml-1 text-secondary-100 max-w-3xl"> |
| 124 | + Detailed case studies by Keploy about optimizing and testing using |
| 125 | + keploy API Tools. Learn how Keploy helps you automate API testing |
| 126 | + and improve code coverage. |
| 127 | + </p> |
| 128 | + </div> |
| 129 | + <CaseStudySearch setSearch={setSearch} /> |
| 130 | + <div className="grid lg:grid-cols-2 lg:gap-y-16 gap-10 md:max-w-[70vw] max-w-[80vw] w-full mb-10"> |
| 131 | + {sampleCaseStudies |
| 132 | + .filter( |
| 133 | + (e) => |
| 134 | + e.text.toLowerCase().includes(search.toLowerCase()) || |
| 135 | + e.tags.some((tag) => |
| 136 | + tag.toLowerCase().includes(search.toLowerCase()) |
| 137 | + ) |
| 138 | + ) |
| 139 | + .map((caseStudy, index) => ( |
| 140 | + <CaseStudyCard |
| 141 | + key={index} |
| 142 | + title={caseStudy.title} |
| 143 | + text={caseStudy.text} |
| 144 | + imageUrl={caseStudy.imageUrl} |
| 145 | + tags={caseStudy.tags} |
| 146 | + /> |
| 147 | + ))} |
| 148 | + </div> |
| 149 | + </div> |
| 150 | + <Footer /> |
| 151 | + </RootLayout> |
| 152 | + ); |
| 153 | +} |
0 commit comments