Skip to content

Commit

Permalink
feat(sidebar): add shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasfrancisco committed Nov 1, 2024
1 parent b15c6e3 commit 593639b
Showing 1 changed file with 36 additions and 17 deletions.
53 changes: 36 additions & 17 deletions apps/engine/src/modules/app-layout/app-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as React from 'react';

import { LucideIcons } from '@ds-project/components';
import { Icons, LucideIcons } from '@ds-project/components';

import {
Sidebar,
Expand All @@ -19,21 +19,20 @@ import {

import Link from 'next/link';
import { AccountMenu } from './acocunt-menu';
// This is sample data.
const data = {
navMain: [
{
title: 'GitHub',
url: '/app/destinations',
icon: LucideIcons.Github,
},
{
title: 'Figma',
url: '/app/sources',
icon: LucideIcons.Figma,
},
],
};
import { config } from '@/config';

const navigationItems = [
{
title: 'GitHub',
url: '/app/destinations',
icon: LucideIcons.Github,
},
{
title: 'Figma',
url: '/app/sources',
icon: LucideIcons.Figma,
},
];

export function AppSidebar({ email }: { email: string }) {
return (
Expand All @@ -52,7 +51,7 @@ export function AppSidebar({ email }: { email: string }) {
<SidebarGroup>
<SidebarGroupLabel>Connections</SidebarGroupLabel>
<SidebarMenu>
{data.navMain.map((item) => (
{navigationItems.map((item) => (
<SidebarMenuItem key={item.title}>
<SidebarMenuButton tooltip={item.title} asChild>
<Link href={item.url}>
Expand All @@ -66,6 +65,26 @@ export function AppSidebar({ email }: { email: string }) {
</SidebarGroup>
</SidebarContent>
<SidebarFooter>
<SidebarGroup>
<SidebarGroupLabel>Shortcuts</SidebarGroupLabel>
<SidebarMenu>
<SidebarMenuItem>
<SidebarMenuButton asChild>
<Link href={config.discordInviteUrl} target="_blank">
<Icons.DiscordLogoIcon />
<span>Discord</span>
</Link>
</SidebarMenuButton>
</SidebarMenuItem>
<SidebarMenuItem>
<SidebarMenuButton asChild>
<Link href={config.feedbackUrl} target="_blank">
<LucideIcons.MessageSquareDot /> <span>Feedback</span>
</Link>
</SidebarMenuButton>
</SidebarMenuItem>
</SidebarMenu>
</SidebarGroup>
<SidebarMenu>
<SidebarMenuItem>
<AccountMenu email={email} />
Expand Down

0 comments on commit 593639b

Please sign in to comment.