Replace home page with logged calls page

This commit is contained in:
David Corbitt
2023-08-08 13:37:55 -07:00
parent a2c322ff43
commit cb791e3c73
7 changed files with 24 additions and 25 deletions

View File

@@ -13,6 +13,7 @@ import {
import Head from "next/head";
import Link from "next/link";
import { BsGearFill, BsGithub, BsPersonCircle } from "react-icons/bs";
import { IoStatsChartOutline } from "react-icons/io5";
import { RiDatabase2Line, RiFlaskLine } from "react-icons/ri";
import { signIn, useSession } from "next-auth/react";
import UserMenu from "./UserMenu";
@@ -51,6 +52,7 @@ const NavSidebar = () => {
<>
<ProjectMenu />
<Divider />
<IconLink icon={IoStatsChartOutline} label="Logged Calls" href="/logged-calls" />
<IconLink icon={RiFlaskLine} label="Experiments" href="/experiments" />
{env.NEXT_PUBLIC_SHOW_DATA && (
<IconLink icon={RiDatabase2Line} label="Data" href="/data" />

View File

@@ -1,5 +1,4 @@
import { HStack, Flex, Text } from "@chakra-ui/react";
import Link from "next/link";
import { useSelectedOrg } from "~/utils/hooks";
// Have to export only contents here instead of full BreadcrumbItem because Chakra doesn't
@@ -10,22 +9,20 @@ export default function ProjectBreadcrumbContents({ orgName = "" }: { orgName?:
orgName = orgName || selectedOrg?.name || "";
return (
<Link href="/home">
<HStack w="full">
<Flex
p={1}
borderRadius={4}
backgroundColor="orange.100"
boxSize={6}
alignItems="center"
justifyContent="center"
>
<Text>{orgName[0]?.toUpperCase()}</Text>
</Flex>
<Text display={{ base: "none", md: "block" }} py={1}>
{orgName}
</Text>
</HStack>
</Link>
<HStack w="full">
<Flex
p={1}
borderRadius={4}
backgroundColor="orange.100"
boxSize={6}
alignItems="center"
justifyContent="center"
>
<Text>{orgName[0]?.toUpperCase()}</Text>
</Flex>
<Text display={{ base: "none", md: "block" }} py={1}>
{orgName}
</Text>
</HStack>
);
}

View File

@@ -86,7 +86,7 @@ export default function ProjectMenu() {
PROJECT
</Text>
<NavSidebarOption activeHrefPattern="/home" disableHoverEffect={expandButtonHovered}>
<Link href="/home">
<Link href="/logged-calls">
<HStack w="full" justifyContent="space-between">
<HStack>
<Flex
@@ -180,7 +180,7 @@ const ProjectOption = ({
return (
<HStack
as={Link}
href="/home"
href="/logged-calls"
onClick={() => {
setSelectedOrgId(org.id);
onClose();