JSFiddle - React, Tailwind, and code Playground

by Kristian Jabilles

JavaScript

const currentUrl = window.location.href;
        
      const hasCodeOrError = !!currentUrl
				.split('&')
				.map(entry => entry.split('='))
				.find(([k]) => k === 'code' || k === 'error');
        
        
        console.log(hasCodeOrError)
        /* console.log(hasTokenOrError) */