import React, { useState } from 'react' import './demo-preview.scss' import { useHistory } from 'react-router-dom' const DemoPreview = () => { const history = useHistory() const [URL, setURL] = useState(history.location.pathname) history.listen((location) => { setURL(location.pathname) }) return (
) } export default DemoPreview