Skip to content

Commit f15c141

Browse files
committed
Add emoji reactions to comments
1 parent 0e1886e commit f15c141

File tree

4 files changed

+647
-74
lines changed

4 files changed

+647
-74
lines changed

src/browser/components/command-palette.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
} from "react";
1414
import { File, FileCode, Search } from "lucide-react";
1515
import { useVirtualizer } from "@tanstack/react-virtual";
16+
import { useLocation } from "react-router-dom";
1617
import { cn } from "../cn";
1718
import { usePRReviewSelector, usePRReviewStore } from "../contexts/pr-review";
1819
import { Keycap, KeycapGroup } from "../ui/keycap";
@@ -33,6 +34,12 @@ const CommandPaletteContext = createContext<CommandPaletteContextValue | null>(
3334

3435
export function CommandPaletteProvider({ children }: { children: ReactNode }) {
3536
const [open, setOpen] = useState(false);
37+
const location = useLocation();
38+
39+
// Close command palette when route changes
40+
useEffect(() => {
41+
setOpen(false);
42+
}, [location.pathname]);
3643

3744
useEffect(() => {
3845
const handleKeyDown = (e: KeyboardEvent) => {

0 commit comments

Comments
 (0)