This file contains 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
<div className="mt-30 w-screen max-w-full"> | |
<VideoModule videoURL={url} /> | |
</div> |
This file contains 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
export default { | |
name: "plan", | |
type: "document", | |
title: "Pricing Plan", | |
fields: [ | |
{ | |
name: "title", | |
title: "Title", | |
type: "string", | |
}, |
This file contains 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 client from 'part:@sanity/base/client'; | |
// Run this script with: `sanity exec --with-user-token scripts/migrate-document-type.js` | |
const OLD_TYPE = 'siteTool'; | |
const NEW_TYPE = 'site.tool'; | |
const fetchDocuments = () => | |
client.fetch( | |
`*[_type == $oldType][0...10] {..., "incomingReferences": *[references(^._id)]{...}}`, |
This file contains 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
items.filter(item => item._id.indexOf("string") === -1).map((item, i) => { | |
return( | |
<> | |
... | |
</> | |
)} |
This file contains 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 average = (arr) => arr.reduce((a, b) => a + b) / arr.length |
This file contains 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 getSelectedText = () => window.getSelection().toString() |
This file contains 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 shuffle = arr => arr.sort(() => Math.random() > 0.5) |
This file contains 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 insertHTMLAfter = (html, el) => el.insertAdjacentHTML('afterend', html) |
This file contains 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 touchSupported = () => ('ontouchstart' in window || DocumentTouch && document instanceof DocumentTouch) |
This file contains 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 daysBetween = (date1, date2) => Math.ceil(Math.abs(date1 - date2) / (1000 * 60 * 60 * 24)) |
NewerOlder