Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion apps/daily/src/app/api/[month]/[day]/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { getDaily, isValidDate } from "@/lib/content";
import { tryCatch } from "@/lib/utils";

export async function GET(_: Request, ctx: RouteContext<"/api/[month]/[day]">) {
type Params = {
params: Promise<{ month: string; day: string }>;
};

export async function GET(_: Request, ctx: Params) {
const { month, day } = await ctx.params;

// Validate against the known content set before importing, and keep the 404
Expand Down
2 changes: 1 addition & 1 deletion apps/portfolio-v2/src/components/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export function Menu() {
}}
variants={panelVariants}
>
<MenuPanel />
<MenuPanel onNavigate={() => setOpen(false)} />
</motion.div>
</PopoverPrimitive.Content>
</PopoverPrimitive.Portal>
Expand Down
8 changes: 4 additions & 4 deletions apps/portfolio-v2/src/components/Menu/MenuPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import { GITHUB, LINKED_IN } from "@/utils/constants";
import ContactDialog from "../Contact/ContactDialog";
import styles from "./styles.module.css";

export function MenuPanel() {
export function MenuPanel({ onNavigate }: { onNavigate: () => void }) {
return (
<div className="mt-10 flex flex-col gap-8">
<Nav />
<Nav onNavigate={onNavigate} />

<div>
<h4 className="mb-3 text-gray10 dark:text-gray11">Connect</h4>
Expand Down Expand Up @@ -139,13 +139,13 @@ const links: Array<{
{ href: "/work", label: "Work", color: "bg-accent-violet" },
];

function Nav() {
function Nav({ onNavigate }: { onNavigate: () => void }) {
return (
<nav>
<ul className="flex flex-col">
{links.map((link) => (
<li key={link.label}>
<a className="font-medium" href={link.href}>
<a className="font-medium" href={link.href} onClick={onNavigate}>
<MenuItem
Icon={
<ArrowRight
Expand Down
Loading