misc changes
This commit is contained in:
parent
365ffb0e87
commit
71079fb9a6
@ -18,7 +18,7 @@ const UserBillingPage = (): ReactElement => (
|
||||
<Separator className="opacity-65" />
|
||||
<p className="opacity-75 select-none pointer-events-none">
|
||||
Billing is not yet available, this will be available to cloud
|
||||
environments.
|
||||
environments in the future.
|
||||
</p>
|
||||
</div>
|
||||
</main>
|
||||
|
@ -43,7 +43,7 @@ const OrganizationSelector = (): ReactElement => {
|
||||
|
||||
// Set the selected organization
|
||||
useEffect(() => {
|
||||
const toSelect: Organization | undefined = organizations.find(
|
||||
const toSelect: Organization | undefined = organizations?.find(
|
||||
(organization: Organization) => {
|
||||
return organization.snowflake === selectedOrganization;
|
||||
}
|
||||
@ -51,11 +51,11 @@ const OrganizationSelector = (): ReactElement => {
|
||||
// Update the state for this page
|
||||
setSelected(
|
||||
toSelect ||
|
||||
(organizations.length > 0 ? organizations[0] : undefined)
|
||||
(organizations?.length > 0 ? organizations[0] : undefined)
|
||||
);
|
||||
|
||||
// Update the state for all pages
|
||||
if (!toSelect && organizations.length > 0) {
|
||||
if (!toSelect && organizations?.length > 0) {
|
||||
setSelectedOrganization(organizations[0].snowflake);
|
||||
}
|
||||
}, [organizations, selectedOrganization, setSelectedOrganization]);
|
||||
@ -101,7 +101,7 @@ const OrganizationSelector = (): ReactElement => {
|
||||
<CommandList>
|
||||
<CommandEmpty>No organizations found.</CommandEmpty>
|
||||
<CommandGroup>
|
||||
{organizations.map(
|
||||
{organizations?.map(
|
||||
(organization: Organization, index: number) => (
|
||||
<CommandItem
|
||||
key={index}
|
||||
|
@ -10,6 +10,7 @@ import {
|
||||
ClipboardIcon,
|
||||
Cog6ToothIcon,
|
||||
FireIcon,
|
||||
HomeIcon,
|
||||
PencilSquareIcon,
|
||||
WrenchIcon,
|
||||
} from "@heroicons/react/24/outline";
|
||||
@ -18,35 +19,40 @@ import { OrganizationState } from "@/app/store/organization-store";
|
||||
import { usePathname } from "next/navigation";
|
||||
|
||||
const links: SidebarLink[] = [
|
||||
{
|
||||
name: "Home",
|
||||
icon: <HomeIcon />,
|
||||
href: "/dashboard",
|
||||
},
|
||||
{
|
||||
name: "Status Pages",
|
||||
icon: <ClipboardIcon />,
|
||||
href: "/status-pages",
|
||||
href: "/dashboard/{org}/status-pages",
|
||||
},
|
||||
{
|
||||
name: "Automations",
|
||||
icon: <WrenchIcon />,
|
||||
href: "/automations",
|
||||
href: "/dashboard/{org}/automations",
|
||||
},
|
||||
{
|
||||
name: "Incidents",
|
||||
icon: <FireIcon />,
|
||||
href: "/incidents",
|
||||
href: "/dashboard/{org}/incidents",
|
||||
},
|
||||
{
|
||||
name: "Insights",
|
||||
icon: <ChartBarSquareIcon />,
|
||||
href: "/insights",
|
||||
href: "/dashboard/{org}/insights",
|
||||
},
|
||||
{
|
||||
name: "Audit Logs",
|
||||
icon: <PencilSquareIcon />,
|
||||
href: "/audit",
|
||||
href: "/dashboard/{org}/audit",
|
||||
},
|
||||
{
|
||||
name: "Settings",
|
||||
icon: <Cog6ToothIcon />,
|
||||
href: "/settings",
|
||||
href: "/dashboard/{org}/settings",
|
||||
},
|
||||
];
|
||||
|
||||
@ -64,7 +70,10 @@ const Links = (): ReactElement => {
|
||||
return (
|
||||
<div className="mt-3.5 w-full flex flex-col gap-0.5 select-none">
|
||||
{links.map((link: SidebarLink, index: number) => {
|
||||
const href: string = `/dashboard/org/${selectedOrganization}${link.href}`;
|
||||
const href: string = link.href.replace(
|
||||
"{org}",
|
||||
selectedOrganization as string
|
||||
);
|
||||
const active: boolean = path.startsWith(href);
|
||||
return (
|
||||
<SimpleTooltip
|
||||
|
@ -75,6 +75,7 @@ const Device = ({
|
||||
className="p-0 w-5 h-5 text-red-500 hover:bg-transparent hover:text-red-500/75"
|
||||
size="icon"
|
||||
variant="ghost"
|
||||
disabled
|
||||
>
|
||||
<ArrowLeftEndOnRectangleIcon />
|
||||
</Button>
|
||||
|
@ -107,8 +107,7 @@ const TFASetting = (): ReactElement => {
|
||||
<h1 className="text-lg font-bold">Two-Factor Auth</h1>
|
||||
<p className="max-w-64 text-sm opacity-75">
|
||||
Enhance your account security with an extra layer of
|
||||
protection. Enable Two-Factor Authentication for safer
|
||||
access!
|
||||
protection.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user