2024-08-01 22:50:01 +03:00

59 lines
2.1 KiB
TypeScript

import { ConnectButton } from "@rainbow-me/rainbowkit";
import React, { useEffect, useState } from "react";
import { useAccount } from "wagmi";
function Landing() {
// Creating a function to connect user's wallet
const { isConnected } = useAccount();
useEffect(() => {
// Connect user's wallet
if (isConnected) {
window.location.href = "/home";
}
}, [isConnected]);
return (
<>
{/* Creating a hero component with black background and centering everything in the screen */}
<section className="relative bg-background-light dark:bg-black flex flex-col h-screen justify-center items-center">
<div className="max-w-7xl mx-auto px-4 sm:px-6">
<div className="pt-32 pb-12 md:pt-40 md:pb-20">
<div className="text-center pb-12 md:pb-16">
<h1
className="text-5xl text-text-light md:text-6xl font-extrabold leading-tighter tracking-tighter mb-4 dark:text-text-dark"
data-aos="zoom-y-out"
>
It is YouTube, but{" "}
<span className="bg-clip-text text-transparent bg-gradient-to-r from-blue-500 to-teal-400">
Decentralized
</span>
</h1>
<div className="max-w-3xl mx-auto">
<p
className="text-xl text-gray-400 mb-8"
data-aos="zoom-y-out"
data-aos-delay="150"
>
A YouTube Clone built on top of Polygon network, allow users
to create, share and watch videos, without worrying about
their privacy.
</p>
<div className="flex justify-center">
<ConnectButton
label="Connect Wallet"
accountStatus="address"
showBalance={false}
/>
</div>
</div>
</div>
</div>
</div>
</section>
</>
);
}
export default Landing;