Skip to content

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