Sootzani/components/RequestStep0.tsx

74 lines
2.7 KiB
TypeScript

"use client";
import { RequestItems, boxItems } from "@/constants";
import { cn } from "@/lib/utils";
import Image from "next/image";
import Link from "next/link";
import React from "react";
export default function RequestStep0() {
return (
<div className="">
<div className="flex justify-between gap-6 w-full mx-auto -mt-10 max-md:mt-2 max-sm:flex-wrap max-sm:justify-around ">
{RequestItems.map((item, index) => {
return (
<Link
className="group bg-white border shadow-md rounded-lg p-10 h-64 w-64 flex z-10 relative
hover:bg-blue transition-all duration-700 ease-in-out text-center
flex-col items-center justify-end gap-2
hover:flex-col-reverse hover:justify-evenly hover:items-center hover:cursor-pointer
max-lg:w-52 max-lg:h-52 max-md:w-40 max-md:h-40
max-lg:p-8 max-md:p-5 max-sm:p-2 hover:max-lg:p-2
max-md:shadow-[0px_0px_8px_0px_#00000040]
"
key={index}
href={item.link}
onClick={() => {
localStorage.removeItem("Sootzani_Login_State");
if (index == 0) {
localStorage.setItem("unknown", "true");
}
if (index == 1) {
localStorage.removeItemItem("unknown");
}
}}
>
<p className="text-xs text-center font-medium text-gray hidden group-hover:flex group-hover:text-white">
{item.description}
</p>
<p className=" z-10 text-base text-black group-hover:text-white max-md:text-sm">
{item.name}
</p>
<p className=" z-10 text-xs text-center font-medium group-hover:hidden">
{item.description}
</p>
<Image
alt="icon"
src={item.icon}
width={20}
height={20}
quality={100}
key={index}
className={cn(
" w-[60%] h-[60%] absolute left-12 top-6 group-hover:hidden max-md:h-[60%] max-md:w-[60%] max-md:left-auto",
item.id == 3 && "left-2"
)}
/>
<Image
alt="icon"
src={item.icon2}
width={20}
height={20}
quality={100}
key={index}
className=" w-[45%] h-[45%] hidden group-hover:flex"
/>
</Link>
);
})}
</div>
</div>
);
}