Skip to content

Commit

Permalink
fix visible error
Browse files Browse the repository at this point in the history
  • Loading branch information
Pethum-Jeewantha committed Feb 4, 2024
1 parent 910d841 commit 1978ea4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/issues/list/IssueLatestBadge.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import React, {useState} from 'react';
import React, {useEffect, useState} from 'react';
import {Badge} from "@radix-ui/themes";
import {useRouter} from "next/navigation";
import {useWebSocket} from "@/app/contexts/WebSocketContext";
Expand All @@ -11,7 +11,11 @@ const IssueLatestBadge = () => {
const {message} = useWebSocket();
const { data: session } = useSession();

const [isVisible, setIsVisible] = useState(true);
const [isVisible, setIsVisible] = useState<boolean>(true);

useEffect(() => {
setIsVisible(true);
}, [message]);

const handleBadgeClick = () => {
router.refresh();
Expand Down

0 comments on commit 1978ea4

Please sign in to comment.