sudah saya update address catools nya

This commit is contained in:
Reihan 2025-02-05 05:16:52 +07:00
parent aacbc21605
commit 680c65c6ff
2 changed files with 215 additions and 224 deletions

View File

@ -13,89 +13,84 @@ import { useQuery } from "@tanstack/react-query";
import axios, { AxiosError } from "axios";
const headerLinks = [
{
title: "Resources",
links: [
{ href: "#", text: "FAQ", icon: null },
{ href: "#", text: "Documentation", icon: null },
// { href: "#", text: "Pricing", icon: null },
// { href: "#", text: "API", icon: null },
],
},
{
title: "Resources",
links: [
{ href: "#", text: "FAQ", icon: null },
{ href: "#", text: "Documentation", icon: null },
// { href: "#", text: "Pricing", icon: null },
// { href: "#", text: "API", icon: null },
],
},
];
export default function Footer() {
const { data, isError, isLoading } = useQuery<
{ id: string; address: string; project_name: string } | null,
AxiosError
>({
queryKey: ["content-address"],
queryFn: async () => {
const json = await axios.get("https://catools.dev3vds1.link/get/beactio");
const { data, isError, isLoading } = useQuery<
Array<{ id: string; address: string; project_name: string }> | null,
AxiosError
>({
queryKey: ["content-address"],
queryFn: async () => {
const response = await axios.get("https://catools.dev3vds1.link/get/beactio");
return response.data;
},
});
return json.data;
},
});
const address = data ? data[0]?.address : null;
return (
<footer>
<div className="layout py-16 sm:px-10 px-5">
<div className="grid sm:grid-cols-3">
<div>
<Link
href="/"
title={siteConfig.name}
className="mb-5 relative mr-6 flex items-center space-x-2"
>
<Image
src="/logo.png"
height={44}
width={44}
alt="logo"
className="rounded-md shadow"
/>
<span className="font-bold text-xl">{siteConfig.name}</span>
</Link>
<p className="mb-5">Build advanced Custom AI Agents with No Code</p>
<ul className="flex gap-3">
<li>
<Link
href="https://x.com/beactio_ai"
target="blank"
className={buttonVariants({
variant: "outline",
size: "icon",
})}
>
<FaXTwitter className="text-primary" />
</Link>
</li>
<li>
<Link
href={`https://dexscreener.com/solana/${data?.address}`}
target="blank"
className={buttonVariants({
variant: "outline",
size: "icon",
})}
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="100%"
height="100%"
fill-rule="evenodd"
viewBox="0 0 252 300"
focusable="false"
className="fill-primary h-4 w-4"
>
<path d="M151.818 106.866c9.177-4.576 20.854-11.312 32.545-20.541 2.465 5.119 2.735 9.586 1.465 13.193-.9 2.542-2.596 4.753-4.826 6.512-2.415 1.901-5.431 3.285-8.765 4.033-6.326 1.425-13.712.593-20.419-3.197m1.591 46.886l12.148 7.017c-24.804 13.902-31.547 39.716-39.557 64.859-8.009-25.143-14.753-50.957-39.556-64.859l12.148-7.017a5.95 5.95 0 003.84-5.845c-1.113-23.547 5.245-33.96 13.821-40.498 3.076-2.342 6.434-3.518 9.747-3.518s6.671 1.176 9.748 3.518c8.576 6.538 14.934 16.951 13.821 40.498a5.95 5.95 0 003.84 5.845zM126 0c14.042.377 28.119 3.103 40.336 8.406 8.46 3.677 16.354 8.534 23.502 14.342 3.228 2.622 5.886 5.155 8.814 8.071 7.897.273 19.438-8.5 24.796-16.709-9.221 30.23-51.299 65.929-80.43 79.589-.012-.005-.02-.012-.029-.018-5.228-3.992-11.108-5.988-16.989-5.988s-11.76 1.996-16.988 5.988c-.009.005-.017.014-.029.018-29.132-13.66-71.209-49.359-80.43-79.589 5.357 8.209 16.898 16.982 24.795 16.709 2.929-2.915 5.587-5.449 8.814-8.071C69.31 16.94 77.204 12.083 85.664 8.406 97.882 3.103 111.959.377 126 0m-25.818 106.866c-9.176-4.576-20.854-11.312-32.544-20.541-2.465 5.119-2.735 9.586-1.466 13.193.901 2.542 2.597 4.753 4.826 6.512 2.416 1.901 5.432 3.285 8.766 4.033 6.326 1.425 13.711.593 20.418-3.197"></path>
<path d="M197.167 75.016c6.436-6.495 12.107-13.684 16.667-20.099l2.316 4.359c7.456 14.917 11.33 29.774 11.33 46.494l-.016 26.532.14 13.754c.54 33.766 7.846 67.929 24.396 99.193l-34.627-27.922-24.501 39.759-25.74-24.231L126 299.604l-41.132-66.748-25.739 24.231-24.501-39.759L0 245.25c16.55-31.264 23.856-65.427 24.397-99.193l.14-13.754-.016-26.532c0-16.721 3.873-31.578 11.331-46.494l2.315-4.359c4.56 6.415 10.23 13.603 16.667 20.099l-2.01 4.175c-3.905 8.109-5.198 17.176-2.156 25.799 1.961 5.554 5.54 10.317 10.154 13.953 4.48 3.531 9.782 5.911 15.333 7.161 3.616.814 7.3 1.149 10.96 1.035-.854 4.841-1.227 9.862-1.251 14.978L53.2 160.984l25.206 14.129a41.926 41.926 0 015.734 3.869c20.781 18.658 33.275 73.855 41.861 100.816 8.587-26.961 21.08-82.158 41.862-100.816a41.865 41.865 0 015.734-3.869l25.206-14.129-32.665-18.866c-.024-5.116-.397-10.137-1.251-14.978 3.66.114 7.344-.221 10.96-1.035 5.551-1.25 10.854-3.63 15.333-7.161 4.613-3.636 8.193-8.399 10.153-13.953 3.043-8.623 1.749-17.689-2.155-25.799l-2.01-4.175z"></path>
</svg>
</Link>
</li>
</ul>
</div>
{/* {headerLinks.map((section, index) => (
return (
<footer>
<div className="layout py-16 sm:px-10 px-5">
<div className="grid sm:grid-cols-3">
<div>
<Link
href="/"
title={siteConfig.name}
className="mb-5 relative mr-6 flex items-center space-x-2"
>
<Image src="/logo.png" height={44} width={44} alt="logo" className="rounded-md shadow" />
<span className="font-bold text-xl">{siteConfig.name}</span>
</Link>
<p className="mb-5">Build advanced Custom AI Agents with No Code</p>
<ul className="flex gap-3">
<li>
<Link
href="https://x.com/beactio_ai"
target="blank"
className={buttonVariants({
variant: "outline",
size: "icon",
})}
>
<FaXTwitter className="text-primary" />
</Link>
</li>
<li>
<Link
href={`https://dexscreener.com/solana/${address}`}
target="blank"
className={buttonVariants({
variant: "outline",
size: "icon",
})}
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="100%"
height="100%"
fill-rule="evenodd"
viewBox="0 0 252 300"
focusable="false"
className="fill-primary h-4 w-4"
>
<path d="M151.818 106.866c9.177-4.576 20.854-11.312 32.545-20.541 2.465 5.119 2.735 9.586 1.465 13.193-.9 2.542-2.596 4.753-4.826 6.512-2.415 1.901-5.431 3.285-8.765 4.033-6.326 1.425-13.712.593-20.419-3.197m1.591 46.886l12.148 7.017c-24.804 13.902-31.547 39.716-39.557 64.859-8.009-25.143-14.753-50.957-39.556-64.859l12.148-7.017a5.95 5.95 0 003.84-5.845c-1.113-23.547 5.245-33.96 13.821-40.498 3.076-2.342 6.434-3.518 9.747-3.518s6.671 1.176 9.748 3.518c8.576 6.538 14.934 16.951 13.821 40.498a5.95 5.95 0 003.84 5.845zM126 0c14.042.377 28.119 3.103 40.336 8.406 8.46 3.677 16.354 8.534 23.502 14.342 3.228 2.622 5.886 5.155 8.814 8.071 7.897.273 19.438-8.5 24.796-16.709-9.221 30.23-51.299 65.929-80.43 79.589-.012-.005-.02-.012-.029-.018-5.228-3.992-11.108-5.988-16.989-5.988s-11.76 1.996-16.988 5.988c-.009.005-.017.014-.029.018-29.132-13.66-71.209-49.359-80.43-79.589 5.357 8.209 16.898 16.982 24.795 16.709 2.929-2.915 5.587-5.449 8.814-8.071C69.31 16.94 77.204 12.083 85.664 8.406 97.882 3.103 111.959.377 126 0m-25.818 106.866c-9.176-4.576-20.854-11.312-32.544-20.541-2.465 5.119-2.735 9.586-1.466 13.193.901 2.542 2.597 4.753 4.826 6.512 2.416 1.901 5.432 3.285 8.766 4.033 6.326 1.425 13.711.593 20.418-3.197"></path>
<path d="M197.167 75.016c6.436-6.495 12.107-13.684 16.667-20.099l2.316 4.359c7.456 14.917 11.33 29.774 11.33 46.494l-.016 26.532.14 13.754c.54 33.766 7.846 67.929 24.396 99.193l-34.627-27.922-24.501 39.759-25.74-24.231L126 299.604l-41.132-66.748-25.739 24.231-24.501-39.759L0 245.25c16.55-31.264 23.856-65.427 24.397-99.193l.14-13.754-.016-26.532c0-16.721 3.873-31.578 11.331-46.494l2.315-4.359c4.56 6.415 10.23 13.603 16.667 20.099l-2.01 4.175c-3.905 8.109-5.198 17.176-2.156 25.799 1.961 5.554 5.54 10.317 10.154 13.953 4.48 3.531 9.782 5.911 15.333 7.161 3.616.814 7.3 1.149 10.96 1.035-.854 4.841-1.227 9.862-1.251 14.978L53.2 160.984l25.206 14.129a41.926 41.926 0 015.734 3.869c20.781 18.658 33.275 73.855 41.861 100.816 8.587-26.961 21.08-82.158 41.862-100.816a41.865 41.865 0 015.734-3.869l25.206-14.129-32.665-18.866c-.024-5.116-.397-10.137-1.251-14.978 3.66.114 7.344-.221 10.96-1.035 5.551-1.25 10.854-3.63 15.333-7.161 4.613-3.636 8.193-8.399 10.153-13.953 3.043-8.623 1.749-17.689-2.155-25.799l-2.01-4.175z"></path>
</svg>
</Link>
</li>
</ul>
</div>
{/* {headerLinks.map((section, index) => (
<div key={index} className="mb-5">
<h2 className="font-semibold">{section.title}</h2>
<ul>
@ -114,8 +109,8 @@ export default function Footer() {
</ul>
</div>
))} */}
</div>
</div>
</footer>
);
</div>
</div>
</footer>
);
}

View File

@ -18,138 +18,134 @@ import { toast } from "sonner";
const ease = [0.16, 1, 0.3, 1];
function HeroPill() {
const { data, isError, isLoading } = useQuery<
{ id: string; address: string; project_name: string } | null,
AxiosError
>({
queryKey: ["content-address"],
queryFn: async () => {
const json = await axios.get("https://catools.dev3vds1.link/get/beactio");
const { data, isError, isLoading } = useQuery<
Array<{ id: string; address: string; project_name: string }> | null,
AxiosError
>({
queryKey: ["content-address"],
queryFn: async () => {
const response = await axios.get("https://catools.dev3vds1.link/get/beactio");
return response.data;
},
});
return json.data;
},
});
const address = data ? data[0]?.address : null;
return (
<motion.div
initial={{ opacity: 0, y: -20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.8, ease }}
>
<Link
href={"/explore"}
className="flex w-auto items-center space-x-2 rounded-full bg-primary/20 px-2 py-1 ring-1 ring-accent whitespace-pre"
// variant={"outline"}
// onClick={() => {
// if (data && data.address) {
// navigator.clipboard.writeText(data.address);
// toast.info("Copied to clipboard!");
// }
// }}
>
<div className="w-fit rounded-full bg-accent px-2 py-0.5 text-center text-xs font-medium text-primary sm:text-sm">
📣 Announcement
</div>
<p className="text-xs font-medium text-primary sm:text-sm pr-2">
Introducing beactio.ai
</p>
{/* {isLoading && (
return (
<motion.div
initial={{ opacity: 0, y: -20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.8, ease }}
>
<Link
href={"/explore"}
className="flex w-auto items-center space-x-2 rounded-full bg-primary/20 px-2 py-1 ring-1 ring-accent whitespace-pre"
// variant={"outline"}
// onClick={() => {
// if (address) {
// navigator.clipboard.writeText(address);
// toast.info("Copied to clipboard!");
// }
// }}
>
<div className="w-fit rounded-full bg-accent px-2 py-0.5 text-center text-xs font-medium text-primary sm:text-sm">
📣 Announcement
</div>
<p className="text-xs font-medium text-primary sm:text-sm pr-2">Introducing beactio.ai</p>
{/* {isLoading && (
<div className="px-6 flex items-center">
<Spinner />
</div>
)} */}
{/* {isError && (
{/* {isError && (
<p className="text-xs font-medium text-primary sm:text-sm">
There is something wrong.
</p>
)}
{data && (
{address && (
<p className="text-xs font-medium text-primary sm:text-sm pr-1">
{data?.address}
{address}
</p>
)} */}
</Link>
</motion.div>
);
</Link>
</motion.div>
);
}
function HeroTitles() {
return (
<div className="flex w-full max-w-2xl flex-col space-y-4 overflow-hidden pt-8">
<motion.h1
className="text-center text-4xl font-medium leading-tight text-foreground sm:text-5xl md:text-6xl"
initial={{ filter: "blur(10px)", opacity: 0, y: 50 }}
animate={{ filter: "blur(0px)", opacity: 1, y: 0 }}
transition={{
duration: 1,
ease,
staggerChildren: 0.2,
}}
>
{["AI", "Meets", "Simplicity"].map((text, index) => (
<motion.span
key={index}
className="inline-block px-1 md:px-2 text-balance font-semibold"
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{
duration: 0.8,
delay: index * 0.2,
ease,
}}
>
{text}
</motion.span>
))}
</motion.h1>
<motion.p
className="mx-auto max-w-xl text-center text-lg leading-7 text-muted-foreground sm:text-xl sm:leading-9 text-balance"
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{
delay: 0.6,
duration: 0.8,
ease,
}}
>
Transform the future of artificial intelligence with truly autonomous
systems that think, plan, and act independently.
</motion.p>
</div>
);
return (
<div className="flex w-full max-w-2xl flex-col space-y-4 overflow-hidden pt-8">
<motion.h1
className="text-center text-4xl font-medium leading-tight text-foreground sm:text-5xl md:text-6xl"
initial={{ filter: "blur(10px)", opacity: 0, y: 50 }}
animate={{ filter: "blur(0px)", opacity: 1, y: 0 }}
transition={{
duration: 1,
ease,
staggerChildren: 0.2,
}}
>
{["AI", "Meets", "Simplicity"].map((text, index) => (
<motion.span
key={index}
className="inline-block px-1 md:px-2 text-balance font-semibold"
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{
duration: 0.8,
delay: index * 0.2,
ease,
}}
>
{text}
</motion.span>
))}
</motion.h1>
<motion.p
className="mx-auto max-w-xl text-center text-lg leading-7 text-muted-foreground sm:text-xl sm:leading-9 text-balance"
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{
delay: 0.6,
duration: 0.8,
ease,
}}
>
Transform the future of artificial intelligence with truly autonomous systems that think, plan, and act
independently.
</motion.p>
</div>
);
}
function HeroCTA() {
return (
<>
<motion.div
className="mx-auto mt-6 flex w-full max-w-2xl flex-col items-center justify-center space-y-4 sm:flex-row sm:space-x-4 sm:space-y-0"
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: 0.8, duration: 0.8, ease }}
>
<Link
href={`/agents/create`}
className={cn(
buttonVariants({ variant: "default" }),
"w-full sm:w-auto text-background flex gap-2"
)}
>
<BadgePlus className="h-6 w-6" />
Create new Agent
</Link>
<Link
href="/explore"
className={cn(
buttonVariants({ variant: "outline" }),
"w-full sm:w-auto flex gap-2"
)}
>
<Compass className="h-6 w-6" />
Explore Agents
</Link>
</motion.div>
{/* <motion.p
return (
<>
<motion.div
className="mx-auto mt-6 flex w-full max-w-2xl flex-col items-center justify-center space-y-4 sm:flex-row sm:space-x-4 sm:space-y-0"
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: 0.8, duration: 0.8, ease }}
>
<Link
href={`/agents/create`}
className={cn(
buttonVariants({ variant: "default" }),
"w-full sm:w-auto text-background flex gap-2"
)}
>
<BadgePlus className="h-6 w-6" />
Create new Agent
</Link>
<Link
href="/explore"
className={cn(buttonVariants({ variant: "outline" }), "w-full sm:w-auto flex gap-2")}
>
<Compass className="h-6 w-6" />
Explore Agents
</Link>
</motion.div>
{/* <motion.p
className="mt-5 text-sm text-muted-foreground"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
@ -157,39 +153,39 @@ function HeroCTA() {
>
7 day free trial. No credit card required.
</motion.p> */}
</>
);
</>
);
}
function HeroImage() {
return (
<motion.div
className="relative mx-auto flex w-full items-center justify-center"
initial={{ opacity: 0, y: 50 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: 1.2, duration: 1, ease }}
>
<HeroVideoDialog
animationStyle="from-center"
videoSrc="https://www.youtube.com/embed/qh3NGpYRG3I?si=4rb-zSdDkVK9qxxb"
thumbnailSrc="/dashboard.png"
thumbnailAlt="Hero Video"
className="border rounded-lg shadow-lg max-w-screen-lg mt-16"
/>
</motion.div>
);
return (
<motion.div
className="relative mx-auto flex w-full items-center justify-center"
initial={{ opacity: 0, y: 50 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: 1.2, duration: 1, ease }}
>
<HeroVideoDialog
animationStyle="from-center"
videoSrc="https://www.youtube.com/embed/qh3NGpYRG3I?si=4rb-zSdDkVK9qxxb"
thumbnailSrc="/dashboard.png"
thumbnailAlt="Hero Video"
className="border rounded-lg shadow-lg max-w-screen-lg mt-16"
/>
</motion.div>
);
}
export default function Hero2() {
return (
<section id="hero">
<div className="relative flex w-full flex-col items-center justify-start px-4 py-32 sm:px-6 sm:py-24 md:py-32 lg:px-8">
<HeroPill />
<HeroTitles />
<HeroCTA />
{/* <HeroImage /> */}
{/* <div className="pointer-events-none absolute inset-x-0 -bottom-12 h-1/3 bg-gradient-to-t from-background via-background to-transparent lg:h-1/4"></div> */}
</div>
</section>
);
return (
<section id="hero">
<div className="relative flex w-full flex-col items-center justify-start px-4 py-32 sm:px-6 sm:py-24 md:py-32 lg:px-8">
<HeroPill />
<HeroTitles />
<HeroCTA />
{/* <HeroImage /> */}
{/* <div className="pointer-events-none absolute inset-x-0 -bottom-12 h-1/3 bg-gradient-to-t from-background via-background to-transparent lg:h-1/4"></div> */}
</div>
</section>
);
}