Skip to content

Commit

Permalink
♻ refactor: voltando o contador para o tempo padrão
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonioNarcilio committed Mar 4, 2021
1 parent f496ff6 commit 83dc79d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/contexts/CountdownContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const CountdownContext = createContext({} as CountdownContextData);
export function CountdownProvider({ children }: CountdownProviderProps) {
const { startNewChallenge } = useContext(ChallengeContext);

const [time, setTime] = useState(0.1 * 60); // tempo em segundos → 25 minutos * 60 seg
const [time, setTime] = useState(25 * 60); // tempo em segundos → 25 minutos * 60 seg
// Estado utilizado para armazenar se o countdown está ativo ou não
const [isActive, setIsActive] = useState(false);
const [hasFinished, setHasFinished] = useState(false);
Expand All @@ -45,7 +45,7 @@ export function CountdownProvider({ children }: CountdownProviderProps) {
setIsActive(false);
setHasFinished(false);
// Voltando o tempo para o valor padrão
setTime(0.1 * 60);
setTime(25 * 60);
}

useEffect(() => {
Expand Down

1 comment on commit 83dc79d

@vercel
Copy link

@vercel vercel bot commented on 83dc79d Mar 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.