mirror of
https://github.com/harivansh-afk/Saas-Teamspace.git
synced 2026-04-19 23:01:36 +00:00
changed a lot
This commit is contained in:
parent
ef9ccf22d3
commit
28901128ff
20 changed files with 1794 additions and 526 deletions
|
|
@ -1,55 +1,21 @@
|
|||
'use client'
|
||||
|
||||
import { useState, useEffect } from 'react'
|
||||
import { Sparkles } from 'lucide-react'
|
||||
import Link from 'next/link'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Skeleton } from '@/components/ui/skeleton'
|
||||
|
||||
const IframeWithSkeleton = () => {
|
||||
const [iframeLoaded, setIframeLoaded] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
const iframe = document.getElementById('youtube-iframe') as HTMLIFrameElement;
|
||||
if (iframe) {
|
||||
const handleIframeLoad = () => {
|
||||
setIframeLoaded(true);
|
||||
};
|
||||
|
||||
iframe.addEventListener('load', handleIframeLoad);
|
||||
|
||||
return () => {
|
||||
iframe.removeEventListener('load', handleIframeLoad);
|
||||
};
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
{!iframeLoaded && <Skeleton className="w-full max-w-2xl h-auto aspect-video" />}
|
||||
<iframe
|
||||
id="youtube-iframe"
|
||||
src="https://www.youtube.com/embed/Q6jDdtbkMIU?si=YtgU89RhYiwt5-U5"
|
||||
title="YouTube Video Player"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||
className={`w-full max-w-2xl h-auto aspect-video rounded-[6px] ${iframeLoaded ? '' : 'hidden'}`}
|
||||
></iframe>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export const Header = () => {
|
||||
return (
|
||||
<div className="space-y-20 mt-32">
|
||||
<div className="mx-auto grid grid-cols-1 lg:grid-cols-2 gap-8">
|
||||
<div className="flex flex-col justify-center text-center lg:text-left ">
|
||||
<div className="mx-auto grid grid-cols-1 gap-8">
|
||||
<div className="flex flex-col justify-center text-center">
|
||||
<h2 className="text-4xl font-extrabold sm:text-5xl">
|
||||
Clone. Build. Ship.
|
||||
</h2>
|
||||
<p className="mt-4 text-lg text-foreground">
|
||||
Build your SaaS faster with our fully customizable template.
|
||||
</p>
|
||||
<div className="flex justify-center lg:justify-start items-center mt-4">
|
||||
<div className="flex justify-center items-center mt-4">
|
||||
<Link href="/overview">
|
||||
<Button className="gap-2">
|
||||
<Sparkles className="h-5 w-5" />
|
||||
|
|
@ -58,9 +24,6 @@ export const Header = () => {
|
|||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center justify-center rounded-lg overflow-hidden">
|
||||
<IframeWithSkeleton />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue