feat: move Demo button next to CTA in header right section
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
"use client";
|
||||
|
||||
import { useTranslation } from "@turbostarter/i18n";
|
||||
import { cn } from "@turbostarter/ui";
|
||||
import { buttonVariants } from "@turbostarter/ui-web/button";
|
||||
|
||||
import { pathsConfig } from "~/config/paths";
|
||||
import { WhyRatingLogo } from "~/modules/common/whyrating-logo";
|
||||
import { TurboLink } from "~/modules/common/turbo-link";
|
||||
@@ -13,11 +17,6 @@ const links = [
|
||||
label: "marketing:howItWorks.label",
|
||||
href: "/#how-it-works",
|
||||
},
|
||||
{
|
||||
label: "marketing:demoLabel",
|
||||
href: pathsConfig.demo.report,
|
||||
variant: "button" as const,
|
||||
},
|
||||
{
|
||||
label: "billing:pricing.label",
|
||||
href: pathsConfig.marketing.pricing,
|
||||
@@ -33,6 +32,8 @@ const links = [
|
||||
] as const;
|
||||
|
||||
export const Header = () => {
|
||||
const { t } = useTranslation("marketing");
|
||||
|
||||
return (
|
||||
<header className="bg-background/80 sticky inset-0 top-[var(--banner-height)] z-40 w-full py-3 backdrop-blur-sm">
|
||||
<div className="flex items-center justify-between px-6 pr-4 sm:container">
|
||||
@@ -46,7 +47,16 @@ export const Header = () => {
|
||||
|
||||
<Navigation links={links} />
|
||||
|
||||
<div className="flex items-center justify-center lg:gap-2">
|
||||
<div className="flex items-center justify-center gap-2">
|
||||
<TurboLink
|
||||
href={pathsConfig.demo.report}
|
||||
className={cn(
|
||||
buttonVariants({ variant: "outline", size: "sm" }),
|
||||
"hidden lg:inline-flex",
|
||||
)}
|
||||
>
|
||||
{t("demoLabel")}
|
||||
</TurboLink>
|
||||
<CtaButton className="hidden lg:inline-flex" />
|
||||
<MobileNavigation links={links} />
|
||||
</div>
|
||||
|
||||
@@ -97,8 +97,6 @@ export const MobileNavigation = ({ links }: NavigationProps) => {
|
||||
className={cn(
|
||||
navigationMenuTriggerStyle(),
|
||||
"w-full justify-start text-base font-medium",
|
||||
"href" in link && link.variant === "button" &&
|
||||
"border bg-primary/5 font-semibold rounded-full",
|
||||
)}
|
||||
onClick={() => setOpen(false)}
|
||||
>
|
||||
|
||||
@@ -27,11 +27,7 @@ export const Navigation = ({ links }: NavigationProps) => {
|
||||
<NavigationMenuLink asChild>
|
||||
<TurboLink
|
||||
href={link.href}
|
||||
className={cn(
|
||||
navigationMenuTriggerStyle(),
|
||||
"href" in link && link.variant === "button" &&
|
||||
"border bg-primary/5 font-semibold hover:bg-primary/10 rounded-full px-4",
|
||||
)}
|
||||
className={navigationMenuTriggerStyle()}
|
||||
>
|
||||
{t(link.label)}
|
||||
</TurboLink>
|
||||
|
||||
@@ -5,7 +5,6 @@ export type NavigationLink =
|
||||
| {
|
||||
readonly label: TranslationKey;
|
||||
readonly href: string;
|
||||
readonly variant?: "default" | "button";
|
||||
}
|
||||
| {
|
||||
readonly label: TranslationKey;
|
||||
|
||||
Reference in New Issue
Block a user