File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { ExclamationTriangleIcon } from "@heroicons/react/20/solid";
22import { json } from "@remix-run/node" ;
33import { useFetcher } from "@remix-run/react" ;
44import { motion } from "framer-motion" ;
5- import { useCallback , useEffect , useRef } from "react" ;
5+ import { useCallback , useEffect } from "react" ;
66import { LinkButton } from "~/components/primitives/Buttons" ;
77import { Paragraph } from "~/components/primitives/Paragraph" ;
88import { Popover , PopoverContent , PopoverTrigger } from "~/components/primitives/Popover" ;
@@ -26,12 +26,10 @@ export async function loader() {
2626export function IncidentStatusPanel ( { isCollapsed = false } : { isCollapsed ?: boolean } ) {
2727 const { isManagedCloud } = useFeatures ( ) ;
2828 const fetcher = useFetcher < typeof loader > ( ) ;
29- const fetcherRef = useRef ( fetcher ) ;
30- fetcherRef . current = fetcher ;
3129
3230 const fetchIncidents = useCallback ( ( ) => {
33- if ( fetcherRef . current . state === "idle" ) {
34- fetcherRef . current . load ( "/resources/incidents" ) ;
31+ if ( fetcher . state === "idle" ) {
32+ fetcher . load ( "/resources/incidents" ) ;
3533 }
3634 } , [ ] ) ;
3735
You can’t perform that action at this time.
0 commit comments