Need help with timer logic in Pomodoro Project

Hi there, I am having issue with timer logic on Pomodoro Project.
When it goes through the condition first time state is updated and new time for break session is starting, but it does not switch back.
Any help is appreciated.
My code is here
https://codepen.io/vecherstvo/pen/rNOOxWa?editors=0010

timer() {
   
    if (this.state.secCount === 56) {
      if (this.state.timerLabel == "session") {
        this.setState({
          secCount: this.state.breakLengthSec - 1,
          timerLabel: "break"
        });
      }
    } else if (this.state.secCount === 56) {
      if (this.state.timerLabel == "break") {
        this.setState({
          secCount: this.state.count - 1,
          timerLabel: "session"
        });
      } 
    } else if (this.state.secCount > 56) {
      this.setState({
        secCount: this.state.secCount - 1
      });
    }
  }

PS I set 56 instead of 0 for testing purposes to save waiting time.
Thank you

Looking at your code i can see that you made an error. Your second else if condition is the same as the first. What you want to do is maybe

timer() {
   
    if (this.state.secCount === 56) {
      if (this.state.timerLabel == "session") {
        this.setState({
          secCount: this.state.breakLengthSec - 1,
          timerLabel: "break"
        });
      } else  if (this.state.timerLabel == "break") {
        this.setState({
          secCount: this.state.count - 1,
          timerLabel: "session"
        });
    }
    } else if (this.state.secCount > 56) {
      this.setState({
        secCount: this.state.secCount - 1
      });
    }
  }

Dont try and copy and paste this code its just an example, your first if block i.e if (this.state.secCount === 56) should house the if else statement of session and break. I hope you get this ??

thank you so much for your help. I put one more function in the timer, and now it is working correctly.

You are welcome. I am glad it helps.