Add beta to logged calls
This commit is contained in:
@@ -52,7 +52,7 @@ const NavSidebar = () => {
|
|||||||
<>
|
<>
|
||||||
<ProjectMenu />
|
<ProjectMenu />
|
||||||
<Divider />
|
<Divider />
|
||||||
<IconLink icon={IoStatsChartOutline} label="Logged Calls" href="/logged-calls" />
|
<IconLink icon={IoStatsChartOutline} label="Logged Calls" href="/logged-calls" beta/>
|
||||||
<IconLink icon={RiFlaskLine} label="Experiments" href="/experiments" />
|
<IconLink icon={RiFlaskLine} label="Experiments" href="/experiments" />
|
||||||
{env.NEXT_PUBLIC_SHOW_DATA && (
|
{env.NEXT_PUBLIC_SHOW_DATA && (
|
||||||
<IconLink icon={RiDatabase2Line} label="Data" href="/data" />
|
<IconLink icon={RiDatabase2Line} label="Data" href="/data" />
|
||||||
|
|||||||
@@ -3,18 +3,26 @@ import Link, { type LinkProps } from "next/link";
|
|||||||
import { type IconType } from "react-icons";
|
import { type IconType } from "react-icons";
|
||||||
import NavSidebarOption from "./NavSidebarOption";
|
import NavSidebarOption from "./NavSidebarOption";
|
||||||
|
|
||||||
type IconLinkProps = BoxProps & LinkProps & { label?: string; icon: IconType; href: string };
|
type IconLinkProps = BoxProps &
|
||||||
|
LinkProps & { label?: string; icon: IconType; href: string; beta?: boolean };
|
||||||
|
|
||||||
const IconLink = ({ icon, label, href, color, ...props }: IconLinkProps) => {
|
const IconLink = ({ icon, label, href, color, beta, ...props }: IconLinkProps) => {
|
||||||
return (
|
return (
|
||||||
<Link href={href} style={{ width: "100%" }}>
|
<Link href={href} style={{ width: "100%" }}>
|
||||||
<NavSidebarOption activeHrefPattern={href}>
|
<NavSidebarOption activeHrefPattern={href}>
|
||||||
<HStack w="full" p={2} color={color} justifyContent="start" {...props}>
|
<HStack w="full" justifyContent="space-between" p={2} color={color} {...props}>
|
||||||
|
<HStack w="full" justifyContent="start">
|
||||||
<Icon as={icon} boxSize={6} mr={2} />
|
<Icon as={icon} boxSize={6} mr={2} />
|
||||||
<Text fontSize="sm" display={{ base: "none", md: "block" }}>
|
<Text fontSize="sm" display={{ base: "none", md: "block" }}>
|
||||||
{label}
|
{label}
|
||||||
</Text>
|
</Text>
|
||||||
</HStack>
|
</HStack>
|
||||||
|
{beta && (
|
||||||
|
<Text fontSize="xs" ml={2} fontWeight="bold" color="orange.400">
|
||||||
|
BETA
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
</HStack>
|
||||||
</NavSidebarOption>
|
</NavSidebarOption>
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user