Skip to content

Commit

Permalink
fix(#time): fix timer
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardRNStudio committed Aug 13, 2024
1 parent 8a56bb4 commit d4a18a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/(home)/_components/Profile/Time/Time.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ const getDate = () =>
});

const Time = () => {
const [time, setTime] = useState<string>(getDate());
const [time, setTime] = useState<string>();

useEffect(() => {
setTime(getDate());
const interval = setInterval(() => {
setTime(getDate());
}, 1000);
Expand Down

0 comments on commit d4a18a0

Please sign in to comment.