Skip to content

Instantly share code, notes, and snippets.

@richgcook
richgcook / Groq
Created March 19, 2026 21:45 — forked from rylanharper/Groq
Sanity + Nuxt3 + Nuxt Image(RC) → Using Blurhash & Lazysizes
_type == "picture" => {
_type,
"image": {
...,
"height": asset->metadata.dimensions.height,
"width": asset->metadata.dimensions.width,
"dimensions": asset->metadata.dimensions,
"blurhash": asset->metadata.blurHash,
"lqip": asset->metadata.lqip
}
@richgcook
richgcook / menu.js
Created October 14, 2020 12:58 — forked from chaance/menu.js
Recursive menu component (React + Next.js)
import React, { Component } from 'react';
import Link from 'next/link';
import { uniqueId } from 'lodash';
import PropTypes from 'prop-types';
class Menu extends Component {
renderSubMenu = (children) => {
if (children && children.length > 0) {
return (
<ul className="menu__submenu">{this.renderMenuItems(children)}</ul>