feat: Qna section

main
Thuong_e 2 years ago
parent abdbb9350e
commit e7cc1d132d
  1. 128
      src/shared/components/home/AboutSection.tsx
  2. 260
      src/shared/components/home/FirstSection.tsx
  3. 209
      src/shared/components/home/QnASection.tsx
  4. 212
      src/shared/components/home/RoadMap.tsx
  5. 299
      src/shared/components/home/TokenomicsSection.tsx
  6. 26
      src/shared/components/home/text

@ -1,67 +1,73 @@
import React from 'react' import React, { useState, useEffect } from "react";
import aboutImage from '../../../assets/images/robot32.png' import aboutImage from "../../../assets/images/robot32.png";
import VideoSGPT from '../../../assets/sgpt.mp4' import VideoSGPT from "../../../assets/sgpt.mp4";
import MysteriousText from '../animated/MysteriousText' import MysteriousText from "../animated/MysteriousText";
type Props = {} import TypingText from "../animated/TypingText";
type Props = {};
const AboutSection = (props: Props) => { const AboutSection = (props: Props) => {
const copyToClipboard = (address: string) => { const copyToClipboard = (address: string) => {
navigator.clipboard.writeText(address) navigator.clipboard.writeText(address);
} };
return ( return (
<div <div
className="container mx-auto text-white py-2 flex relative" className="container mx-auto text-white py-2 lg:flex-row flex-col flex relative "
id="about" id="about"
style={{ style={{
backgroundImage: `url(https://awv3node-homepage.surge.sh/build/assets/stars.svg)}`, backgroundImage: `url(https://awv3node-homepage.surge.sh/build/assets/stars.svg)}`,
}} }}
> >
<div className="flex flex-col justify-center gap-10 lg:w-1/2 w-full px-8 pt-2"> <div className="flex flex-col justify-center gap-10 lg:w-1/2 w-full px-8 pt-2 order-1">
<div className="flex flex-col gap-8"> <div className="flex flex-col gap-8">
<h4 className="text-3xl uppercase font-bold hover:text-orange-400"> <h4 className="text-3xl uppercase font-bold hover:text-orange-400">
What is SGPT? What is SGPT?
</h4> </h4>
<p className="text-gray-100 md:w-4/5 text-lg"> {/* <div>
<MysteriousText> <h1>{typedText}</h1>
SGPT Token is a complementary token created on the </div> */}
blockchain platform to provide a platform for small <p className="text-gray-100 md:w-4/5 text-lg min-h-[255px]">
and medium-sized businesses (SMBs) to create and <TypingText>
manage an internal Q&A system. SGPT Token will be SGPT Token is a complementary token created on the blockchain
used to conduct transactions on the platform and platform to provide a platform for small and medium-sized
provide benefits to members of the internal Q&A businesses (SMBs) to create and manage an internal Q&A system.
system. SGPT Token will also be used to reward SGPT Token will be used to conduct transactions on the platform
members who make positive contributions to the and provide benefits to members of the internal Q&A system. SGPT
system. Token will also be used to reward members who make positive
</MysteriousText> contributions to the system.
</p> </TypingText>
</div> {/* <MysteriousText>
</MysteriousText> */}
</p>
</div>
<div className="flex flex-col gap-4"> <div className="flex flex-col gap-4">
<h4 className="text-3xl uppercase font-bold hover:text-orange-400"> <h4 className="text-3xl uppercase font-bold hover:text-orange-400">
SGPT Solution SGPT Solution
</h4> </h4>
<p className="text-gray-100 md:w-4/5 text-lg"> <p className="text-gray-100 md:w-4/5 text-lg min-h-[225px]">
<MysteriousText> {/* <h1>{typedText}</h1> */}
The SGPT Token is a solution to the problems <TypingText>
associated with traditional payment methods for chat The SGPT Token is a solution to the problems associated with
bot services. The token is built on blockchain traditional payment methods for chat bot services. The token is
technology, which ensures that transactions are built on blockchain technology, which ensures that transactions
fast, secure, and transparent. Moreover, the use of are fast, secure, and transparent. Moreover, the use of the SGPT
the SGPT Token eliminates the need for traditional Token eliminates the need for traditional payment methods, which
payment methods, which are often costly and are often costly and inconvenient.
inconvenient. </TypingText>
</MysteriousText> {/* <MysteriousText>
</p>
</div> </MysteriousText> */}
</div> </p>
<div className="md:w-1/2 md:flex hidden justify-center items-center">
<video controls className="rounded-md" muted autoPlay>
<source src={VideoSGPT} type="video/mp4" />
</video>
</div>
</div> </div>
) </div>
} <div className="lg:w-1/2 md:flex hidden justify-center items-center h-[660px] lg:order-1 w-full">
<video controls className="rounded-md" muted autoPlay>
<source src={VideoSGPT} type="video/mp4" />
</video>
</div>
</div>
);
};
export default AboutSection export default AboutSection;

@ -1,124 +1,118 @@
import robotImage from '../../../assets/images/robot-2.png' import robotImage from "../../../assets/images/robot-2.png";
import robotImage2 from '../../../assets/images/robot-coin1.png' import robotImage2 from "../../../assets/images/robot-coin1.png";
import robotBgr from '../../../assets/images/robot-bgr.png' import robotBgr from "../../../assets/images/robot-bgr.png";
import VideoSGPTBg from '../../../assets/sgpt-bg.mp4' import VideoSGPTBg from "../../../assets/sgpt-bg.mp4";
import Button from '../Button' import Button from "../Button";
import { import {
BsFacebook, BsFacebook,
BsDiscord, BsDiscord,
BsTwitter, BsTwitter,
BsTelegram, BsTelegram,
BsInstagram, BsInstagram,
BsRocketFill, BsRocketFill,
} from 'react-icons/bs' } from "react-icons/bs";
import { IoCopyOutline } from 'react-icons/io5' import { IoCopyOutline } from "react-icons/io5";
import { TbAddressBook } from 'react-icons/tb' import { TbAddressBook } from "react-icons/tb";
import { useSprings, useSpring, animated } from '@react-spring/web' import { useSprings, useSpring, animated } from "@react-spring/web";
const socials = [ const socials = [
{ {
name: 'Telegram', name: "Telegram",
icon: <BsTelegram />, icon: <BsTelegram />,
link: 'https://twitter.com/SGPT_SmartAi', link: "https://twitter.com/SGPT_SmartAi",
background: 'bg-[#2ca5e0]', background: "bg-[#2ca5e0]",
}, },
{ {
name: 'Twitter', name: "Twitter",
icon: <BsTwitter />, icon: <BsTwitter />,
link: 'https://twitter.com/SGPT_SmartAi', link: "https://twitter.com/SGPT_SmartAi",
background: 'bg-[#1da1f2]', background: "bg-[#1da1f2]",
}, },
{ {
name: 'Discord', name: "Discord",
icon: <BsDiscord />, icon: <BsDiscord />,
link: 'https://discord.com/invite/NNHV8JHBhk', link: "https://discord.com/invite/NNHV8JHBhk",
background: 'bg-[#7289da]', background: "bg-[#7289da]",
}, },
{ {
name: 'Facebook', name: "Facebook",
icon: <BsFacebook />, icon: <BsFacebook />,
link: 'https://www.facebook.com/SGPTSmartAi', link: "https://www.facebook.com/SGPTSmartAi",
background: 'bg-[#3b5998]', background: "bg-[#3b5998]",
}, },
{ {
name: 'Instagram', name: "Instagram",
icon: <BsInstagram />, icon: <BsInstagram />,
link: 'https://www.instagram.com/sgpt_smartai/', link: "https://www.instagram.com/sgpt_smartai/",
background: 'bg-[#e1306c]', background: "bg-[#e1306c]",
}, },
] ];
const FirstSection = () => { const FirstSection = () => {
const address = '0x3c97331438e90680a17c35905ffc2b8ef760f844' const address = "0x3c97331438e90680a17c35905ffc2b8ef760f844";
const truncateAddress = (address: string) => { const truncateAddress = (address: string) => {
return address.slice(0, 5) + '......' + address.slice(-5) return address.slice(0, 5) + "......" + address.slice(-5);
} };
const copyToClipboard = (address: string) => { const copyToClipboard = (address: string) => {
navigator.clipboard.writeText(address) navigator.clipboard.writeText(address);
} };
const springs = useSpring({ const springs = useSpring({
from: { opacity: 0 }, from: { opacity: 0 },
to: { opacity: 1 }, to: { opacity: 1 },
}) });
return ( return (
<animated.div <animated.div
className="lg:min-h-screen px-10 lg:px-0 flex bg-cover bg-center bg-no-repeat relative" className="lg:min-h-screen px-10 lg:px-0 flex bg-cover bg-center bg-no-repeat relative"
id="home" id="home"
style={springs} style={springs}
>
<div
style={{ backgroundImage: `url(${robotBgr})` }}
className="blur-sm absolute top-0 left-0 w-full h-full bg-cover bg-center bg-no-repeat"
></div>
<div>
<video
controls
autoPlay
muted
className="blur-sm absolute top-0 left-0 w-full h-full bg-cover bg-center bg-no-repeat"
> >
{/* <div <source src={VideoSGPTBg} type="video/mp4" />
style={{ backgroundImage: `url(${robotBgr})` }} </video>
className="blur-sm absolute top-0 left-0 w-full h-full bg-cover bg-center bg-no-repeat" </div>
></div> */} <div className="absolute top-0 left-0 w-full h-full bg-black opacity-60"></div>
<div> <div className="container flex mx-auto min-h-[70vh] text-white z-20 mt-20">
<video <div className="lg:w-4/5 flex flex-col justify-center lg:pb-0 gap-16 pb-20 z-50">
controls <div className="flex flex-col gap-10 ">
autoPlay <h4 className="lg:w-3/4 lg:text-5xl md:text-5xl text-3xl font-bold hover:text-orange-400">
muted A digital currency payment for chat bot services
className="blur-sm absolute top-0 left-0 w-full h-full bg-cover bg-center bg-no-repeat" </h4>
> <p className="lg:w-2/3 w-full font-body">
<source src={VideoSGPTBg} type="video/mp4" /> The SGPT Token is a digital currency designed to facilitate
</video> payments for services provided by the SGPT chat bot. The chat bot
</div> is a powerful tool that utilizes artificial intelligence to
<div className="absolute top-0 left-0 w-full h-full bg-black opacity-60"></div> communicate with users and provide valuable information and
<div className="container flex mx-auto min-h-[70vh] text-white z-20 mt-20"> services.
<div className="lg:w-4/5 flex flex-col justify-center lg:pb-0 gap-14 pb-20 z-50"> </p>
<div className="flex flex-col gap-10 "> </div>
<h4 className="lg:w-3/4 lg:text-5xl md:text-5xl text-3xl font-bold hover:text-orange-400">
A digital currency payment for chat bot services
</h4>
{/* <p className="lg:w-2/3 w-full font-body">
The SGPT Token is a digital currency designed to
facilitate payments for services provided by the
SGPT chat bot. The chat bot is a powerful tool that
utilizes artificial intelligence to communicate with
users and provide valuable information and services.
</p> */}
</div>
<div className=""> <div className="">
<div className="border border-orange-500 flex items-center justify-between lg:w-3/4"> <div className="border border-orange-500 rounded-md flex items-center justify-between lg:w-3/4">
<div className="flex rounded items-center w-1/2 gap-4"> <div className="flex rounded items-center w-1/2 gap-4">
<TbAddressBook <TbAddressBook className="text-orange-500" size={22} />
className="text-orange-500" <h2 className="text-gray-100 text-2xl font-bold hover:text-orange-400">
size={22} Address on BSC{" "}
/> </h2>
<h2 className="text-gray-100 text-2xl font-bold hover:text-orange-400"> <TbAddressBook className="text-orange-500" size={22} />
Address on BSC{' '} </div>
</h2> <div className="text-gray-100 text-2xl flex gap-3 items-center w-1/2">
<TbAddressBook {truncateAddress(address)}
className="text-orange-500" <IoCopyOutline size={24} />
size={22} </div>
/> </div>
</div> {/* <div className="border border-orange-500">
<div className="text-gray-100 text-2xl flex gap-3 items-center w-1/2">
{truncateAddress(address)}
<IoCopyOutline size={24} />
</div>
</div>
{/* <div className="border border-orange-500">
<div className="flex rounded animate-slide-loop items-center gap-4 py-6"> <div className="flex rounded animate-slide-loop items-center gap-4 py-6">
<BsRocketFill <BsRocketFill
className="text-orange-500" className="text-orange-500"
@ -149,27 +143,27 @@ const FirstSection = () => {
))} ))}
</div> </div>
</div> */} </div> */}
</div> </div>
</div> </div>
<div className="lg:w-1/5 hidden lg:flex justify-center items-center relative"> <div className="lg:w-1/5 hidden lg:flex justify-center items-center relative">
<img <img
src={robotImage2} src={robotImage2}
className="object-cover absolute -left-40 border-4 backdrop-blur-sm shadow-2xl shadow-cyan-300 border-cyan-500 rounded-full w-full aspect-square transition-all duration-500 cursor-pointer filter hover:border-orange-500" className="object-cover absolute -left-40 border-4 backdrop-blur-sm shadow-2xl shadow-cyan-300 border-cyan-500 rounded-full w-full aspect-square transition-all duration-500 cursor-pointer filter hover:border-orange-500"
alt="robot-ai" alt="robot-ai"
/> />
<img <img
src={robotImage} src={robotImage}
className="object-cover absolute top-28 border-4 backdrop-blur-sm shadow-2xl shadow-cyan-300 border-cyan-500 rounded-full w-40 aspect-square hover:border-orange-500" className="object-cover absolute top-28 border-4 backdrop-blur-sm shadow-2xl shadow-cyan-300 border-cyan-500 rounded-full w-40 aspect-square hover:border-orange-500"
alt="robot-ai" alt="robot-ai"
/> />
<div className="absolute w-10 aspect-square blur-sm bg-gradient-to-br from-rose-500 to-indigo-700 rounded-full top-32 -left-10"></div> <div className="absolute w-10 aspect-square blur-sm bg-gradient-to-br from-rose-500 to-indigo-700 rounded-full top-32 -left-10"></div>
<div className="absolute w-10 aspect-square bg-[radial-gradient(ellipse_at_bottom,_var(--tw-gradient-stops))] from-sky-400 to-indigo-900 blur-sm rounded-full bottom-56 right-10"></div> <div className="absolute w-10 aspect-square bg-[radial-gradient(ellipse_at_bottom,_var(--tw-gradient-stops))] from-sky-400 to-indigo-900 blur-sm rounded-full bottom-56 right-10"></div>
</div> </div>
</div> </div>
</animated.div> </animated.div>
) );
} };
export default FirstSection export default FirstSection;

@ -1,28 +1,187 @@
import { useSpring, animated } from '@react-spring/web' import { useSpring, animated } from "@react-spring/web";
import React, { useEffect, useRef, useState } from 'react' import React, { useEffect, useRef, useState } from "react";
import { VscDebugBreakpointLog } from 'react-icons/vsc' import {
VscArrowDown,
type Props = {} VscChevronDown,
VscDebugBreakpointLog,
VscDiffAdded,
} from "react-icons/vsc";
import "../animated/QnASection.css";
type Props = {};
const QnASection = (props: Props) => { const QnASection = (props: Props) => {
return ( const listQnA = [
<div {
className="container flex justify-between items-center mx-auto py-2 text-white" id: 1,
id="qna" title: "Abc",
> bgcolor: "bg-[#CC99FF]",
<div> contents: [
<h1 className="text-4xl font-bold text-center hover:text-orange-400"> {
FAQS id: 1,
</h1> content: "12sdfsd3",
<h2> bgcolor: "bg-[#9999FF]",
See some of the most frequently asked questions about Fight },
{/* Out here. Got a question thats not on the list? Let us know {
id: 2,
content: "123ádsa",
bgcolor: "bg-[#6699FF]",
},
{
id: 3,
content: "123ádas",
bgcolor: "bg-[#3399FF]",
},
{
id: 4,
content: "123ádasd",
bgcolor: "bg-[#0099FF]",
},
],
},
{
id: 2,
title: "Abcd",
bgcolor: "bg-[#CC66FF]",
contents: [
{
id: 1,
bgcolor: "bg-[#9966FF]",
content: "ádasffjk12",
},
{
id: 2,
bgcolor: "bg-[#6666FF]",
content: "ádasffj1k",
},
{
id: 3,
bgcolor: "bg-[#3366FF]",
content: "ádasffj12k",
},
{
id: 4,
bgcolor: "bg-[#0066FF]",
content: "ádasffj123k",
},
],
},
];
const showListItem = (id: string) => {
const element = document.getElementById(`${id}`);
// const ulhidden = document.querySelector(`#${id} ul`);
const ulhidden = document.querySelector(`#${id}>ul`);
console.log(ulhidden);
ulhidden?.classList.toggle("hidden");
ulhidden?.classList.toggle("flex");
};
const [isVisible, setIsVisible] = useState(false);
useEffect(() => {
const section = document.querySelector("#qna");
const observer = new IntersectionObserver(
([entry]) => {
setIsVisible(entry.isIntersecting);
},
{ threshold: 0.5 }
);
if (!section) {
return;
}
observer.observe(section);
return () => {
observer.unobserve(section);
};
}, []);
useEffect(() => {
console.log("isVisible", isVisible);
}, [isVisible]);
const styles = useSpring({
opacity: isVisible ? 1 : 0,
from: {
opacity: 0,
},
to: {
opacity: isVisible ? 1 : 0,
},
config: {
duration: 1000,
},
});
return (
<div
className="container min-h-[400px] mb-[100px] flex flex-wrap lg:justify-between justify-center items-start mx-auto py-2 text-white "
id="qna"
>
<div className="w-full lg:w-[50%]">
<h1 className="text-4xl font-bold text-center hover:text-orange-400">
FAQS
</h1>
<h2 className="text-center ">
See some of the most frequently asked questions about Fight
{/* Out here. Got a question thats not on the list? Let us know
below! */} below! */}
</h2> </h2>
</div> </div>
<div>ABC</div>
</div> <animated.div
) className="w-1/2 flex justify-end overflow-hidden"
} style={{
...styles,
export default QnASection }}
>
<ul className="flex flex-col items-center gap-4 lg:w-3/4 w-full ">
{listQnA.map((item, index) => {
return (
<li
id={item.title}
key={item.id}
className="w-full items-center flex flex-col pl-3 pr-3 "
>
<div className="w-full h-[52px] flex justify-between items-center bg-slate-200 pl-3 pr-3 z-10 relative ">
<div
className={`absolute h-full left-0 top-0 w-2 ${item.bgcolor}`}
></div>
<span className="text-xl font-bold text-gray-700">
{item.title}
</span>
<div
className="listQnA h-6 w-6 flex cursor-pointer "
onClick={() => showListItem(item.title)}
>
<VscChevronDown className="hover:text-2xl m-auto text-gray-700" />
</div>
</div>
<ul className="hidden ul-hidden flex-col gap-y-0.5 pt-1 pl-0.5 w-full list-answer animate-[listShowdown_0.75s_ease] animate-[listHidden_0.75s_ease]">
{item.contents.map((list, index) => {
return (
<li
key={list.id}
className=" w-full h-10 flex items-center border-t-2 border-gray-400 pl-3 pr-3 bg-slate-200 relative"
>
<div
className={`absolute h-full left-0 top-0 w-2 ${list.bgcolor}`}
></div>
<span className="text-lg font-bold text-gray-700">
{list.content}
</span>
</li>
);
})}
</ul>
</li>
);
})}
</ul>
</animated.div>
</div>
);
};
export default QnASection;

@ -1,120 +1,124 @@
import { useSpring, animated } from '@react-spring/web' import { useSpring, animated } from "@react-spring/web";
import React, { useEffect, useRef, useState } from 'react' import React, { useEffect, useRef, useState } from "react";
import { VscDebugBreakpointLog } from 'react-icons/vsc' import { VscDebugBreakpointLog } from "react-icons/vsc";
type Props = {};
type Props = {}
const roadMapData = [ const roadMapData = [
{ {
phase: 'Phase 1', phase: "Phase 1",
listTitle: [ listTitle: [
'Development of CEO Ideology', "Development of CEO Ideology",
'Website Development and Release', "Website Development and Release",
'Whitepaper Launch', "Whitepaper Launch",
'Subscription Presale', "Subscription Presale",
'Marketing Partners Advisory Board Formed', "Marketing Partners Advisory Board Formed",
], ],
}, },
{ {
phase: 'Phase 2', phase: "Phase 2",
listTitle: [ listTitle: [
'CEO DEX Token Launch', "CEO DEX Token Launch",
'Massive Marketing Campaign', "Massive Marketing Campaign",
'Real Time Suprise Buybacks', "Real Time Suprise Buybacks",
'NFT Staking and APR Staking Launch', "NFT Staking and APR Staking Launch",
'5 Million Marketcap Milestone CoinGecko Listing', "5 Million Marketcap Milestone CoinGecko Listing",
], ],
}, },
{ {
phase: 'Phase 3', phase: "Phase 3",
listTitle: [ listTitle: [
'Swap Development and Launch', "Swap Development and Launch",
'Merchandise Launch', "Merchandise Launch",
'Tier 1 CEX Listings', "Tier 1 CEX Listings",
'CEO Bridge to ETH, Arbitrium and Polygon', "CEO Bridge to ETH, Arbitrium and Polygon",
'10 Million MarketCap Milestone', "10 Million MarketCap Milestone",
'CEOAI Bot Creator and integration with AI.', "CEOAI Bot Creator and integration with AI.",
], ],
}, },
] ];
const RoadMap = (props: Props) => { const RoadMap = (props: Props) => {
const [isVisible, setIsVisible] = useState(false) const [isVisible, setIsVisible] = useState(false);
useEffect(() => { useEffect(() => {
const section = document.querySelector('.animate-on-scroll') const section = document.querySelector(".animate-on-scroll");
const observer = new IntersectionObserver( const observer = new IntersectionObserver(
([entry]) => { ([entry]) => {
setIsVisible(entry.isIntersecting) setIsVisible(entry.isIntersecting);
}, },
{ threshold: 0.5 } { threshold: 0.5 }
) );
if (!section) { if (!section) {
return return;
} }
observer.observe(section) observer.observe(section);
return () => { return () => {
observer.unobserve(section) observer.unobserve(section);
} };
}, []) }, []);
useEffect(() => { useEffect(() => {
console.log('isVisible', isVisible) console.log("isVisible", isVisible);
}, [isVisible]) }, [isVisible]);
const styles = useSpring({ const styles = useSpring({
opacity: isVisible ? 1 : 0, opacity: isVisible ? 1 : 0,
transform: isVisible ? 'translateY(0)' : 'translateY(100px)', transform: isVisible ? "translateX(0)" : "translateX(100px)",
config: { config: {
duration: 500, duration: 500,
}, },
}) });
return ( return (
<div <div
className="container mx-auto text-white md:min-h-[60vh] animate-on-scroll py-20" className="container mx-auto text-white md:min-h-[60vh] animate-on-scroll py-20 relative"
id="roadmap" id="roadmap"
> >
<h1 className="text-4xl font-bold text-center hover:text-orange-400"> <div className="absolute top-[150px] left-[50%] w-2 h-[80%] bg-gradient-to-b from-violet-500 to-fuchsia-500"></div>
Road Map <h1 className="text-4xl font-bold text-center hover:text-orange-400 pb-20">
</h1> Road Map
</h1>
{/* <div className="flex flex-col lg:flex-row gap-10 mt-20 justify-center px-10 lg:px-0"> */}
<animated.div style={styles}>
{roadMapData.map((item, index) => {
return (
<div
key={index}
className="relative roadmapphase w-1/2 bg-white text-black rounded-lg [&:nth-child(odd)>div]:right-[-25%] [&:nth-child(odd)]:float-left [&:nth-child(odd)]:clear-right [&:nth-child(odd)]:translate-x-[-30px] [&:nth-child(even)]:float-right [&:nth-child(even)]:clear-left [&:nth-child(even)]:translate-x-12"
>
<div className="absolute h-[30px] w-[30px] rounded-[50%] bg-gradient-to-b from-violet-500 to-fuchsia-500"></div>
<div className="flex flex-col lg:flex-row gap-10 mt-20 justify-center px-10 lg:px-0"> <h4 className="timeline-title p-2 text-[28px] text-[#6a06ec] font-medium">
{roadMapData.map((item, index) => { {item.phase}
return ( </h4>
<animated.div <ol className="flex flex-col gap-2">
key={index} {item.listTitle.map((listItem, index) => {
className="lg:w-1/4 bg-orange-400 rounded-lg min-h-[250px] p-5" return (
style={styles} <li
> key={index}
<h4 className="text-center text-3xl text-gray-100 font-semibold mb-6"> className="flex items-center gap-3 p-2 text-lg"
{item.phase} >
</h4> <VscDebugBreakpointLog
<ol className="flex flex-col gap-2"> style={{
{item.listTitle.map((listItem, index) => { color: "#B051F2",
return ( }}
<li />
key={index} <p className="font-medium font-body">{listItem}</p>
className="flex items-center gap-3" </li>
> );
<VscDebugBreakpointLog width={18} />
<p className="font-medium font-body">
{listItem}
</p>
</li>
)
})}
</ol>
</animated.div>
)
})} })}
</ol>
</div> </div>
</div> );
) })}
} </animated.div>
</div>
// </div>
);
};
export default RoadMap export default RoadMap;

@ -1,138 +1,191 @@
import { useSpring, animated } from '@react-spring/web' import { useSpring, animated } from "@react-spring/web";
import { useEffect, useState } from 'react' import { useEffect, useState } from "react";
import tokenomicChart from '../../../assets/images/tokenomic-chart.png' import tokenomicChart from "../../../assets/images/tokenomic-chart.png";
import { Pie } from "react-chartjs-2";
type Props = {} import "chart.js/auto";
type Props = {};
const tokenomics = [ const tokenomics = [
{ {
title: 'Liquidity - 5% 1,000,000 SGPT', title: "Liquidity - 5% 1,000,000 SGPT",
description: ' ', precent: "5",
color: 'bg-[#86eae9]', description: " ",
}, color: "#86eae9",
{ bgcolor: "bg-[#86eae9]",
title: 'Private Sale - 17% 3,400,000 SGPT', },
description: ' ', {
color: 'bg-[#5dbdd3]', title: "Private Sale - 17% 3,400,000 SGPT",
}, description: " ",
{ precent: "17",
title: 'Stacking & Farming - 15% 3,000,000 SGPT', color: "#5dbdd3",
description: ' ', bgcolor: "bg-[#5dbdd3]",
color: 'bg-[#4591b8]', },
}, {
{ title: "Stacking & Farming - 15% 3,000,000 SGPT",
title: 'Marketing & Promotion - 15% 3,000,000 SGPT', description: " ",
description: ' ', precent: "15",
color: 'bg-[#3b6696]', color: "#4591b8",
}, bgcolor: "bg-[#4591b8]",
{ },
title: 'Public Sale - 14% 2,800,000 SGPT', {
description: ' ', title: "Marketing & Promotion - 15% 3,000,000 SGPT",
color: 'bg-[#353c6e]', description: " ",
}, precent: "15",
{ color: "#3b6696",
title: 'Reward & Q&A - 10% 2,000,000 SGPT', bgcolor: "bg-[#3b6696]",
description: ' ', },
color: 'bg-[#705788]', {
}, title: "Public Sale - 14% 2,800,000 SGPT",
{ description: " ",
title: 'Advisor - 10% 2,000,000 SGPT', precent: "14",
description: ' ', color: "#353c6e",
color: 'bg-[#a5769e]', bgcolor: "bg-[#353c6e]",
}, },
{ {
title: 'Treasury - 14% 2,800,000 SGPT', title: "Reward & Q&A - 10% 2,000,000 SGPT",
description: ' ', description: " ",
color: 'bg-[#d59ab3]', precent: "10",
}, color: "#705788",
] bgcolor: "bg-[#705788]",
},
{
title: "Advisor - 10% 2,000,000 SGPT",
description: " ",
precent: "10",
color: "#a5769e",
bgcolor: "bg-[#a5769e]",
},
{
title: "Treasury - 14% 2,800,000 SGPT",
description: " ",
precent: "14",
color: "#d59ab3",
bgcolor: "bg-[#d59ab3]",
},
];
const TokenomicsSection = (props: Props) => { const TokenomicsSection = (props: Props) => {
const [isVisible, setIsVisible] = useState(true) const [isVisible, setIsVisible] = useState(false);
useEffect(() => { useEffect(() => {
const section = document.querySelector('#tokenomics') const section = document.getElementById("tokenomics");
const observer = new IntersectionObserver( const observer = new IntersectionObserver(
([entry]) => { ([entry]) => {
setIsVisible(entry.isIntersecting) setIsVisible(entry.isIntersecting);
}, },
{ threshold: 0.5 } { threshold: 0.5 }
) );
if (!section) { if (!section) {
return return;
} }
observer.observe(section) observer.observe(section);
return () => { return () => {
observer.unobserve(section) observer.unobserve(section);
} };
}, []) }, []);
useEffect(() => { useEffect(() => {
console.log('isVisible', isVisible) console.log("isVisible", isVisible);
}, [isVisible]) }, [isVisible]);
const styles = useSpring({ const styles = useSpring({
opacity: isVisible ? 1 : 0, opacity: isVisible ? 1 : 0,
from: { transform: isVisible ? "translateY(0)" : "translateY(100px)",
opacity: 0, config: {
transform: 'translateY(100px)', duration: 500,
}, },
to: { });
opacity: isVisible ? 1 : 0,
transform: 'translateY(0px)',
},
config: { const textCenter = {
duration: 500, id: "textCenter",
beforeDatasetsDraw(chart: any, arg: any, pluginsOptions: any) {
const { ctx, data } = chart;
ctx.save();
ctx.fillStyle = "#fff";
ctx.font = "bolder 30px sen";
ctx.textAlign = "center";
ctx.textBaseline = "middle";
ctx.fillText(
`TOTAL SUPPLE`,
chart.getDatasetMeta(0).data[0].x,
chart.getDatasetMeta(0).data[0].y - 20
);
ctx.fillText(
`20,000,000 SGPT`,
chart.getDatasetMeta(0).data[0].x,
chart.getDatasetMeta(0).data[0].y + 25
);
},
};
const [userData, setUserData] = useState({
labels: tokenomics.map((data) => data.title),
datasets: [
{
// label: "text",
data: tokenomics.map((data) => data.precent),
backgroundColor: tokenomics.map((data) => data.color),
// cutout: "10%",
borderWidth: 2,
delay: 100,
},
],
});
const labelText = {
hoverBorderWidth: 4,
plugins: {
legend: {
display: false,
},
tooltip: {
callbacks: {
label: (context: any) => {
return ` ${context.label}`;
},
}, },
}) },
return ( },
<div className="w-full pb-24" id="tokenomics"> };
<div className="container mx-auto">
<h1 className="text-4xl text-white font-bold text-center mb-20">
Tokenomics
</h1>
<div className="w-full flex flex-col gap-4 lg:flex-row"> return (
<div className="lg:w-1/2 flex justify-center"> <div className="w-full pb-24" id="tokenomics">
<img <div className="container mx-auto">
src={tokenomicChart} <h1 className="text-4xl text-white font-bold text-center mb-20">
alt="" Tokenomics
className="rounded-3xl w-[80%]" </h1>
/> <div className="w-full flex justify-center items-center lg:justify-between flex-col gap-y-12 gap-x-4 lg:flex-row">
</div> <div className="w-full lg:w-1/2 flex justify-center">
<animated.div style={{ width: "500px", ...styles }}>
<Pie data={userData} plugins={[textCenter]} options={labelText} />
</animated.div>
</div>
<div className="lg:w-1/2"> <div className="w-full justify-center">
<ul className="flex flex-col items-end justify-center h-full gap-3 px-3 max-sm:pt-10 cursor-pointer"> <ul className="flex flex-col items-end justify-center h-full gap-3 px-3 max-sm:pt-10 cursor-pointer">
{tokenomics.map((item, index) => { {tokenomics.map((item, index) => {
return ( return (
<animated.li <animated.li
key={index} key={index}
className={`text-center w-full lg:w-2/3 bg-slate-200 py-3 relative`} className={`text-center w-full lg:w-3/4 bg-slate-200 py-3 relative`}
style={{ style={styles}
...styles, >
}} <div
> className={`absolute h-full top-0 w-2 ${item.bgcolor}`}
<div ></div>
className={`absolute h-full top-0 w-2 ${item.color}`} <h4 className="text-xl font-bold text-gray-700">
></div> {item.title}
<h4 className="text-xl font-bold text-gray-700"> </h4>
{item.title} <p className="text-gray-500">{item.description}</p>
</h4> </animated.li>
<p className="text-gray-500"> );
{item.description} })}
</p> </ul>
</animated.li> </div>
)
})}
</ul>
</div>
</div>
</div>
</div> </div>
) </div>
} </div>
);
};
export default TokenomicsSection export default TokenomicsSection;

@ -0,0 +1,26 @@
<div>
<div className="timeline">
<div className="timeline-container primary">
<div className="timeline-icon">
{index + 1}
{/* <i className="far fa-grin-wink"></i> */}
</div>
<div className="timeline-body">
<h4 className="timeline-title">{item.phase}</h4>
<ol className="flex flex-col gap-2">
{item.listTitle.map((listItem, index) => {
return (
<li
key={index}
className="flex items-center gap-3 text-lg"
>
<VscDebugBreakpointLog />
<p className="font-medium font-body">{listItem}</p>
</li>
);
})}
</ol>
</div>
</div>
</div>
</div>
Loading…
Cancel
Save