The recipes.blue monorepo recipes.blue
recipes appview atproto

feat: update menus

+37 -31
+5 -2
apps/api/src/index.ts
··· 51 51 52 52 app.use(cors({ 53 53 origin: (origin, _ctx) => { 54 - if (env.ENV == 'development') origin; 55 - 54 + if (env.ENV == 'development') { 55 + const host = _ctx.req.header('Host'); 56 + console.log(`https://${host}`); 57 + return `https://${host}`; 58 + } 56 59 return env.CORS_ORIGINS.includes(origin) 57 60 ? origin 58 61 : 'https://cookware.hayden.moe';
+30 -27
apps/web/src/components/app-sidebar.tsx
··· 1 1 import * as React from "react" 2 2 import { 3 - NotebookPen, 4 - Settings2, 5 - Users, 3 + Book, 4 + CookingPot, 5 + ForkKnife, 6 6 } from "lucide-react" 7 7 8 8 import { NavMain } from "@/components/nav-main" ··· 11 11 Sidebar, 12 12 SidebarContent, 13 13 SidebarFooter, 14 + SidebarHeader, 15 + SidebarMenu, 16 + SidebarMenuButton, 17 + SidebarMenuItem, 14 18 SidebarRail, 15 19 } from "@/components/ui/sidebar" 16 20 import { Suspense } from "react" ··· 18 22 import { Link } from "@tanstack/react-router" 19 23 20 24 const data = { 21 - user: { 22 - name: "shadcn", 23 - email: "m@example.com", 24 - avatar: "/avatars/shadcn.jpg", 25 - }, 26 - 27 25 navMain: [ 28 26 { 29 - title: "Community", 27 + title: "Recipes", 30 28 url: "#", 31 - icon: Users, 29 + icon: ForkKnife, 32 30 isActive: true, 33 31 items: [ 34 32 { ··· 40 38 title: "Starred", 41 39 url: "#", 42 40 }, 43 - { 44 - title: "Settings", 45 - url: "#", 46 - }, 47 41 ], 48 42 }, 49 43 { 50 - title: "Yours", 44 + title: "Cookbooks", 51 45 url: "#", 52 - icon: NotebookPen, 46 + icon: Book, 53 47 items: [ 54 48 { 55 - title: "Recipes", 56 - url: "#", 49 + title: "Browse", 50 + url: "/", 57 51 }, 58 - ], 59 - }, 60 - { 61 - title: "Settings", 62 - url: "#", 63 - icon: Settings2, 64 - items: [ 65 52 { 66 - title: "General", 53 + title: "Starred", 67 54 url: "#", 68 55 }, 69 56 ], ··· 74 61 export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) { 75 62 return ( 76 63 <Sidebar collapsible="icon" {...props}> 64 + <SidebarHeader> 65 + <SidebarMenu> 66 + <SidebarMenuItem> 67 + <SidebarMenuButton size="lg" asChild> 68 + <a href="#"> 69 + <div className="flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground"> 70 + <CookingPot className="size-4" /> 71 + </div> 72 + <div className="flex flex-col gap-0.5 leading-none"> 73 + <span className="font-semibold">Cookware</span> 74 + </div> 75 + </a> 76 + </SidebarMenuButton> 77 + </SidebarMenuItem> 78 + </SidebarMenu> 79 + </SidebarHeader> 77 80 <SidebarContent> 78 81 <NavMain items={data.navMain} /> 79 82 </SidebarContent>
+1 -1
apps/web/src/components/nav-main.tsx
··· 36 36 }) { 37 37 return ( 38 38 <SidebarGroup> 39 - <SidebarGroupLabel>Cookware</SidebarGroupLabel> 39 + <SidebarGroupLabel>Community</SidebarGroupLabel> 40 40 <SidebarMenu> 41 41 {items.map((item) => ( 42 42 <Collapsible
+1 -1
apps/web/src/lib/utils.ts
··· 5 5 return twMerge(clsx(inputs)) 6 6 } 7 7 8 - export const SERVER_URL = 'cookware.fly.dev' as const; 8 + export const SERVER_URL = import.meta.env.VITE_API_SERVICE;