Skip to content

Instantly share code, notes, and snippets.

@edwardoverthere
edwardoverthere / contentBuilderModal.jsx
Created March 18, 2024 18:25 — forked from kegansovay/contentBuilderModal.jsx
Sanity Custom Module Input Component
import React, { useState, useCallback } from 'react';
import {
Button,
Flex,
Dialog,
Grid,
Card,
Text,
Box,
TextInput
@edwardoverthere
edwardoverthere / removeDuplicate.js
Created September 16, 2020 03:24
Remove Duplicate Object from Array
function removeDuplicateObjectFromArray(array, key) {
return array.filter((obj, index, self) =>
index === self.findIndex((el) => (
el[key] === obj[key]
))
)
}
const data = arr.reduce((filter, current) => {
const dk = filter.find(item => item.value === current.value);
@edwardoverthere
edwardoverthere / SANITYIMPORT.md
Created September 7, 2020 17:07
Format and Import Content into Sanity

Format and Import Content into Sanity

The following is a quick guide on how to format json data into ndjson and import the resulting data into sanity studio using the sanity cli.

Sanity

Sanity is a structured content platform that is incredibly fast and flexible.

NDJSON

NDJSON is a convenient format for storing or streaming structured data that may be processed one record at a time.

  • Each line is a valid JSON value
@edwardoverthere
edwardoverthere / README-Template.md
Created November 6, 2017 15:20 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites