From ce3164d7d1907c379cbe5ac751fcc14737b8dd73 Mon Sep 17 00:00:00 2001
From: Winston Hsiao <96440583+Winston-Hsiao@users.noreply.github.com>
Date: Wed, 16 Oct 2024 22:12:24 -0400
Subject: [PATCH] Navbar gap on mobile gone, sidebar icons for nav items (#486)
---
frontend/src/components/nav/Navbar.tsx | 53 +++++++++++++++--------
frontend/src/components/nav/Sidebar.tsx | 39 ++++++++++++-----
frontend/src/components/pages/BuyPage.tsx | 4 +-
3 files changed, 63 insertions(+), 33 deletions(-)
diff --git a/frontend/src/components/nav/Navbar.tsx b/frontend/src/components/nav/Navbar.tsx
index dce84be7..9e1d6d3a 100644
--- a/frontend/src/components/nav/Navbar.tsx
+++ b/frontend/src/components/nav/Navbar.tsx
@@ -1,10 +1,10 @@
import { useState } from "react";
-import { FaBars, FaDiscord, FaExternalLinkAlt, FaGithub } from "react-icons/fa";
import {
- FaDownload,
+ FaBars,
+ FaDiscord,
+ FaGithub,
FaRegFileLines,
FaRobot,
- FaSearchengin,
FaWpexplorer,
FaXTwitter,
} from "react-icons/fa6";
@@ -21,6 +21,11 @@ import {
NavigationMenuTrigger,
} from "@/components/ui/navigation-menu";
import { useAuthentication } from "@/hooks/useAuth";
+import {
+ DownloadIcon,
+ ExternalLinkIcon,
+ MagnifyingGlassIcon,
+} from "@radix-ui/react-icons";
const Navbar = () => {
const { isAuthenticated } = useAuthentication();
@@ -58,13 +63,13 @@ const Navbar = () => {
{
name: "Browse",
path: "/browse",
- icon: ,
+ icon: ,
isExternal: false,
},
{
name: "Downloads",
path: "/downloads",
- icon: ,
+ icon: ,
isExternal: false,
},
{
@@ -113,7 +118,7 @@ const Navbar = () => {
{icon}
{title}
-
+
) : (
@@ -136,12 +141,28 @@ const Navbar = () => {
<>
setShowSidebar(false)} />
diff --git a/frontend/src/components/nav/Sidebar.tsx b/frontend/src/components/nav/Sidebar.tsx
index f00cae0f..856bd88f 100644
--- a/frontend/src/components/nav/Sidebar.tsx
+++ b/frontend/src/components/nav/Sidebar.tsx
@@ -1,4 +1,12 @@
-import { FaTimes } from "react-icons/fa";
+import { FaDiscord, FaGithub, FaTimes } from "react-icons/fa";
+import {
+ FaDownload,
+ FaRegFileLines,
+ FaRobot,
+ FaSearchengin,
+ FaWpexplorer,
+ FaXTwitter,
+} from "react-icons/fa6";
import { useNavigate } from "react-router-dom";
import Logo from "@/components/Logo";
@@ -32,22 +40,26 @@ const Sidebar = ({ show, onClose }: SidebarProps) => {
const { isAuthenticated } = useAuthentication();
const navItems = [
- { name: "Pro", path: "/stompy-pro" },
- { name: "Mini", path: "/stompy-mini" },
+ { name: "Pro", path: "/stompy-pro", icon: },
+ { name: "Mini", path: "/stompy-mini", icon: },
];
const technicalItems = [
- { name: "Docs", path: "https://docs.kscale.dev/" },
- { name: "Browse", path: "/browse" },
- { name: "Downloads", path: "/downloads" },
- { name: "Code", path: "https://github.com/kscalelabs" },
- { name: "Playground", path: "/mujoco-test" },
- { name: "Research", path: "/research" },
+ {
+ name: "Docs",
+ path: "https://docs.kscale.dev/",
+ icon: ,
+ },
+ { name: "Browse", path: "/browse", icon: },
+ { name: "Downloads", path: "/downloads", icon: },
+ { name: "Code", path: "https://github.com/kscalelabs", icon: },
+ { name: "Playground", path: "/mujoco-test", icon: },
+ { name: "Research", path: "/research", icon: },
];
const communityItems = [
- { name: "Discord", path: "https://discord.gg/kscale" },
- { name: "Twitter", path: "https://x.com/kscalelabs" },
+ { name: "Discord", path: "https://discord.gg/kscale", icon: },
+ { name: "Twitter", path: "https://x.com/kscalelabs", icon: },
];
const handleItemClick = (path: string, isExternal?: boolean) => {
@@ -76,11 +88,12 @@ const Sidebar = ({ show, onClose }: SidebarProps) => {