Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Watch start button to show stop button once watch has started #1957

Merged
merged 2 commits into from
May 5, 2022

Conversation

jinapurapu
Copy link
Contributor

Screenshot from 2022-05-05 11-05-11

dvaldivia
dvaldivia previously approved these changes May 5, 2022
@kaankabalak
Copy link
Contributor

kaankabalak commented May 5, 2022

@jinapurapu, if we want to save space, we can alternatively use the ternary operator as follows:

            {start ? (
              <Button
                type="submit"
                variant="contained"
                color="primary"
                onClick={() => setStart(false)}
              >
                Stop
              </Button>
            ) : (
              <Button
                type="submit"
                variant="contained"
                color="primary"
                onClick={() => setStart(true)}
              >
                Start
              </Button>
            )}

So, if the start condition is true, we'll render the Button that says Stop and if the start condition is false, we would render the Button that says Start

@dvaldivia dvaldivia merged commit 9103ea9 into minio:master May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants