JSFiddle - React, Tailwind, and code Playground

HTML

<input type="button" id="a" style="display:none;" value="A" />
<input type="button" id="b" style="display:none;" value="B" />

JavaScript

$(document).ready(function() {
    var condition = 0; //i get this from database
    var c = condition;


    if(c == 0){

            $('#a').css({'display':''});   
    }else if(c == 1){

            $('#b').css({'display':''});
    }

        $('#a').click(function(){
              $('#a').hide();
              $('#b').show();
        });
        $('#b').click(function(){
              $('#b').hide();
              $('#a').show();
        });
    });