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 = 15 * 1000 | |
async function getCurrentHash() { | |
const basePath = (config.project && config.project.basePath) || '/' | |
const html = await fetch(basePath).then((res) => res.text()) | |
const [, hash] = html.match(/app\.bundle\.js\?(\w+)/) || [] | |
return hash |
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
{ | |
"blocks": [ | |
{ | |
"type": "header", | |
"text": { | |
"type": "plain_text", | |
"text": coalesce(title, "Untitled article"), | |
"emoji": true | |
} | |
}, |
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
const importName = 'createClient' | |
v5ClientImport.parser = 'tsx' | |
module.exports = v5ClientImport | |
function v5ClientImport(fileInfo, api) { | |
const j = api.jscodeshift | |
const root = j(fileInfo.source) | |
// Imports |
OlderNewer