63 lines
1.9 KiB
TypeScript
Raw Normal View History

2024-05-26 02:14:59 -04:00
"use client";
import { createClient } from "@/utils/supabase/client";
import React, { useState, useEffect } from 'react';
import Search from "@/components/neroshitron/search";
2024-06-01 16:30:05 -04:00
import Gallery from "@/components/neroshitron/gallery";
2024-05-26 02:14:59 -04:00
function PageComponent() {
2024-06-01 16:30:05 -04:00
const [selectedGallery, setSelectedGallery] = useState<string | null>(null);
2024-05-26 02:14:59 -04:00
const supabase = createClient();
const getData = async () => {
}
2024-06-01 16:30:05 -04:00
2024-05-26 02:14:59 -04:00
useEffect(() => {
getData();
2024-06-01 16:30:05 -04:00
console.log(selectedGallery)
}, [selectedGallery]);
const closeGallery = () => {
setSelectedGallery(null);
}
2024-05-27 20:53:24 -04:00
2024-05-26 19:49:20 -04:00
return (
<div className="w-full">
2024-05-27 17:09:49 -04:00
<div className="fixed w-full h-full overflow-hidden z-0 animate-fade-left animate-fade-left animate-once animate-duration-[2000ms] animate-normal animate-fill-forwards">
2024-05-27 16:38:34 -04:00
<img
src="gallery_girl.png"
2024-05-27 23:26:41 -04:00
className="float-right object-cover h-screen w-full lg:w-5/6 xl:w-3/6 opacity-50 overflow-hidden"
2024-05-27 16:38:34 -04:00
alt="Background"
/>
2024-05-27 17:09:49 -04:00
</div>
2024-06-01 16:30:05 -04:00
<Search gallerySelected={(gallery:string)=>{setSelectedGallery(gallery)}}/>
{selectedGallery!=null ? (
<>
{/*
This is the modal for holding the gallery
*/}
<div
className={`fixed inset-0 transition-opacity z-30 animate-in`}
aria-hidden="true"
>
<div
className="absolute inset-0 bg-neroshi-blue-900 opacity-70 z-30"
onClick={() => closeGallery()}
></div>
<div className="absolute inset-0 overflow-y-auto overflow-x-hidden no-scrollbar pt-2 w-full p-20 z-30">
<Gallery
id={selectedGallery as string}
columns={3}
closeMenu={() => closeGallery()}
></Gallery>
</div>
</div>
</>
) : null}
2024-05-27 16:38:34 -04:00
</div>
2024-05-26 19:49:20 -04:00
);
2024-05-26 02:14:59 -04:00
}
export default PageComponent;