"use client" import * as React from "react" import { ChevronDownIcon, DownloadIcon } from "lucide-react" import { Button } from "@/styles/base-sera/ui/button" import { ButtonGroup } from "@/styles/base-sera/ui/button-group" import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuTrigger, } from "@/styles/base-sera/ui/dropdown-menu" const EXPORT_DATE_OPTIONS = [ { label: "Last 7 days", value: "last-7-days", }, { label: "Last 30 days", value: "last-30-days", }, { label: "This month", value: "this-month", }, { label: "Last month", value: "last-month", }, ] export function PreviewHeader() { const [selectedDateRange, setSelectedDateRange] = React.useState("last-30-days") const selectedDateRangeLabel = React.useMemo(() => { const selectedOption = EXPORT_DATE_OPTIONS.find( (option) => option.value === selectedDateRange ) if (!selectedOption) { return "Last 30 days" } return selectedOption.label }, [selectedDateRange]) return (

Audience Analytics

Editorial Performance Dashboard
} > {selectedDateRangeLabel}{" "} {EXPORT_DATE_OPTIONS.map((option) => ( {option.label} ))}
) }