JSFiddle - React, Tailwind, and code Playground

HTML

<input type="checkbox" name="tandc" value="tandc" id="tandc" required>
<label for="tandc">I accept the <a href="/terms-and-conditions">Terms and Conditions</a></label>
    

<a id="continue_shopping" href="#">Continue Shopping</a>

JavaScript

$('#tandc').change(function() {
    if($(this).prop('checked')) {
        $("#continue_shopping").attr('href', '/store/shopping-cart/shipping/');
    } else {
        $("#continue_shopping").removeAttr("href");
    }
  });