diff --git a/src/components/sections/footer.tsx b/src/components/sections/footer.tsx index ab42186..05602d0 100644 --- a/src/components/sections/footer.tsx +++ b/src/components/sections/footer.tsx @@ -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 ( - + ); } diff --git a/src/components/sections/hero.tsx b/src/components/sections/hero.tsx index 2383939..fd5f982 100644 --- a/src/components/sections/hero.tsx +++ b/src/components/sections/hero.tsx @@ -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 ( - - { - // if (data && data.address) { - // navigator.clipboard.writeText(data.address); - // toast.info("Copied to clipboard!"); - // } - // }} - > -
- 📣 Announcement -
-

- Introducing beactio.ai -

- {/* {isLoading && ( + return ( + + { + // if (address) { + // navigator.clipboard.writeText(address); + // toast.info("Copied to clipboard!"); + // } + // }} + > +
+ 📣 Announcement +
+

Introducing beactio.ai

+ {/* {isLoading && (
)} */} - {/* {isError && ( + {/* {isError && (

There is something wrong.

)} - {data && ( + {address && (

- {data?.address} + {address}

)} */} - -
- ); + +
+ ); } function HeroTitles() { - return ( -
- - {["AI", "Meets", "Simplicity"].map((text, index) => ( - - {text} - - ))} - - - Transform the future of artificial intelligence with truly autonomous - systems that think, plan, and act independently. - -
- ); + return ( +
+ + {["AI", "Meets", "Simplicity"].map((text, index) => ( + + {text} + + ))} + + + Transform the future of artificial intelligence with truly autonomous systems that think, plan, and act + independently. + +
+ ); } function HeroCTA() { - return ( - <> - - - - Create new Agent - - - - Explore Agents - - - {/* + + + + Create new Agent + + + + Explore Agents + + + {/* 7 day free trial. No credit card required. */} - - ); + + ); } function HeroImage() { - return ( - - - - ); + return ( + + + + ); } export default function Hero2() { - return ( -
-
- - - - {/* */} - {/*
*/} -
-
- ); + return ( +
+
+ + + + {/* */} + {/*
*/} +
+
+ ); }