Skip to content

Commit

Permalink
fix(frontend): Reset collapsible on navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
declanlscott committed Feb 8, 2024
1 parent fd11651 commit d8d38fb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/components/pages/Restaurant.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from "react";
import { useEffect, useState } from "react";
import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
import { MapPin, Phone } from "lucide-react";

Expand Down Expand Up @@ -29,6 +29,10 @@ export function Restaurant() {

const [isOpen, setIsOpen] = useState(false);

useEffect(() => {
setIsOpen(false);
}, [slug]);

if (isLoading) {
return <RestaurantDetailsSkeleton />;
}
Expand Down

0 comments on commit d8d38fb

Please sign in to comment.