Old function is not working anymore even though there are no changes (Works on Chrome, but not on the Windows Application)

Viewed 18

So I'm working on an application which includes a function that changes the page that is shown, depending on the value of a variable:

function()
  {
    if(something && somethingElse)
    {
      return <Page1 />;
    } else if(something) {
      return <Page2 />;
    } else {
      return <Page3 />;
    }
  }

render()
  {
    return (
      <>
        {this.function()}
      </>
    );
  }

Now everything works on the web version, but the Windows application (which is the same code but just has a homepage with links to the pages) doesn't load one of the pages.

The way the variables are changed is through a submit like below.

onSubmitTerms(e)
  {
    e.preventDefault();
    document.documentElement.requestFullscreen();
    setSomethingElse(true);
  }

render()
  {
    return(
      <PageLayout onClickStartBtn={this.onSubmitTerms}>
        //some code
      </PageLayout>
    );
  }

Again, everything works on the web version: all pages are loaded correctly. When the form is submitted the correct page loads. But on the Windows version, the form won't submit: the button is clickable but when I click it nothing changes (the new page is not shown).

I'm running out of ideas of where the problem could be. I'm using JS and React.js. Please help.

0 Answers
Related