-
Notifications
You must be signed in to change notification settings - Fork 44.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(platform): Sync on new UI design (#8194)
* feat(platform): Sync on new UI design * simplify UI * block list add border and remove padding * add highlight on navbar button --------- Co-authored-by: Swifty <craigswift13@gmail.com>
- Loading branch information
Showing
15 changed files
with
109 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
autogpt_platform/frontend/src/components/NavBarButtons.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
"use client"; | ||
|
||
import Link from "next/link"; | ||
import { BsBoxes } from "react-icons/bs"; | ||
import { LuLaptop } from "react-icons/lu"; | ||
import { LuShoppingCart } from "react-icons/lu"; | ||
import { cn } from "@/lib/utils"; | ||
import { usePathname } from "next/navigation"; | ||
|
||
export function NavBarButtons({ className }: { className?: string }) { | ||
"use client"; | ||
|
||
const pathname = usePathname(); | ||
const buttons = [ | ||
{ | ||
href: "/marketplace", | ||
text: "Marketplace", | ||
icon: <LuShoppingCart />, | ||
}, | ||
{ | ||
href: "/", | ||
text: "Monitor", | ||
icon: <LuLaptop />, | ||
}, | ||
{ | ||
href: "/build", | ||
text: "Build", | ||
icon: <BsBoxes />, | ||
}, | ||
]; | ||
|
||
const activeButton = buttons.find((button) => button.href === pathname); | ||
|
||
console.log(">>>> ", activeButton); | ||
|
||
return buttons.map((button) => ( | ||
<Link | ||
key={button.href} | ||
href={button.href} | ||
className={cn( | ||
className, | ||
"rounded-xl p-3", | ||
activeButton === button ? "button bg-gray-950 text-white" : "", | ||
)} | ||
> | ||
{button.icon} {button.text} | ||
</Link> | ||
)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters