This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect } from "react" | |
import config from "config:sanity" | |
const BUNDLE_CHECK_INTERVAL = 60 * 1000 | |
const CHANGES_AVAILABLE_MESSAGE = | |
"There are changes to the Studio. For the best results the page will be refreshed to update to the latest version of the Studio." | |
async function getCurrentHash() { | |
const basePath = (config.project && config.project.basePath) || "/" | |
const html = await window.fetch(basePath).then((res) => res.text()) |