JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<div id="allow-or-not" title="Show Again?">
  <p>Would you like to show this dialog again?</p>
  <button name="yes" class="ok allowed">Yes</button>
  <button name="no" id="exit">No</button>
</div>

JavaScript

if (!localStorage.hideAlert) {
  $(function() {
    $("#allow-or-not").dialog();
  });
} else {
  $("#allow-or-not").css("display", "none");
}
$(".ok.allowed").on("click", function() {
  $("#allow-or-not").dialog("close");
});
$("#exit").on("click", function() {
  localStorage.setItem('hideAlert', true);
  $("#allow-or-not").dialog("close");
});