import { GetServerSideProps } from "next" import { useEffect, useState } from "react" import { DashboardIcon } from "~/components/icons/DashboardIcon" import { MainLayout } from "~/components/main/MainLayout" import { UniLink } from "~/components/ui/UniLink" import { getAuthUser } from "~/lib/auth.server" import { FLY_REGION } from "~/lib/env.server" import { useStore } from "~/lib/store" import { useAccount } from "wagmi" import { ConnectButton } from "~/components/common/ConnectButton" import Image from "next/image" import { DotsHorizontalIcon, CheckIcon, XIcon } from "@heroicons/react/solid" import { LaughIcon } from "~/components/icons/LaughIcon" import { LoveIcon } from "~/components/icons/LoveIcon" import { BlockchainIcon } from "~/components/icons/BlockchainIcon" import { Button } from "~/components/ui/Button" import { useConnectModal } from "@rainbow-me/rainbowkit" import { useRouter } from "next/router" import { GITHUB_LINK } from "~/lib/env" export const getServerSideProps: GetServerSideProps = async (ctx) => { return { props: { region: FLY_REGION, }, } } export default function Home({ region }: { region: string | null }) { const setLoginModalOpened = useStore((store) => store.setLoginModalOpened) const [addressIn, setAddressIn] = useState("") const { address } = useAccount() const { openConnectModal } = useConnectModal() const router = useRouter() useEffect(() => { console.log("-> region", region) setAddressIn(address || "") }, [region, address]) const [isTry, setIsTry] = useState(false) const tryNow = () => { setIsTry(true) openConnectModal?.() } useEffect(() => { if (isTry && address) { router.push("/dashboard") setIsTry(false) } }, [isTry, address, router]) const description = [ { screenshot: { src: "/screenshot4.png", width: 1542, height: 630, }, icon: , title: "Blockchain", text: ( <> All blog data, including config, posts, following, comment... Permanently stored on the blockchain by your own hands and can only be controlled by yourself and not the platform. ), }, { screenshot: { src: "/screenshot2.png", width: 812, height: 1041, }, icon: , title: "Rich Interactions", text: "Users can follow, comment, like, and collect your blog and posts, all on the blockchain of course.", }, { screenshot: { src: "/screenshot3.png", width: 1101, height: 721, }, icon: , title: "Highly Customizable", text: "Domain name, navigation bar, custom styles, all as you wish, and stored on the blockchain.", }, { screenshot: { src: "/screenshot1.png", width: 812, height: 835, }, icon: , title: "Elegant", text: "Elegant and clean default theme allows you to get a great looking blog straight away.", }, ] const comparing = [ "Only Controlled by Yourself", "Open Source", "Self-hosting", "Like Interaction", "Comment Interaction", "Following Interaction", "Custom Domain", "Custom CSS", "Navigation", "Pages", "Scheduled Publishing", ] return (

Blog on the Blockchain.
Blogging geekily.

Meet xlog, the on-chain and{" "} open-source blogging platform for everyone.

{addressIn ? ( Dashboard ) : ( )}
Trusted by these awesome teams and geeks
  • RSS3
    {description.map((item, index) => (
  • {item.title}

    {item.icon}
    {item.title}

    {item.text}

  • ))}
{comparing.map((item, index) => ( ))}
xlog Mirror.xyz
{item}

logo

{addressIn ? ( ) : ( )}
) }