"use client"; import { useState } from "react"; import { useTranslations } from "next-intl"; import { copyToClipboard } from "@/shared/utils/clipboard"; import { useDisplayBaseUrl } from "@/shared/hooks"; export default function GetStarted() { const t = useTranslations("landing"); const [copied, setCopied] = useState(false); const endpoint = useDisplayBaseUrl(); const dashboardUrl = `${endpoint}/dashboard`; const command = "npx omniroute"; const handleCopy = async (text: string) => { await copyToClipboard(text); setCopied(true); setTimeout(() => setCopied(false), 2000); }; return (
{/* Left: Steps */}

{t("getStartedIn30Seconds")}

{t("getStartedDescription")}

1

{t("installOmniRoute")}

{t("installStepDescription")}

2

{t("openDashboard")}

{t("openDashboardStepDescription")}

3

{t("routeRequests")}

{t("routeRequestsStepDescription", { endpoint })}

{/* Right: Code block */}
{/* Terminal header */}
{t("terminal")}
{/* Terminal content */}
handleCopy(command)} > $ {command} {copied ? t("copied") : t("copy")}
> {t("startingOmniRoute")}
> {t("serverRunningOnLabel")}{" "} {endpoint}
> {t("dashboardLabel")}:{" "} {dashboardUrl}
> {t("readyToRoute")}
{t("configureProvidersNote")}
{t("dataLocation")}
{t("dataLocationMacLinux")}{" "} ~/.omniroute/db.json
{t("dataLocationWindows")}{" "} %APPDATA%/omniroute/db.json
); }