Skip to content

Instantly share code, notes, and snippets.

View sachdeva-shrey's full-sized avatar
🎯
Focusing

Shrey Sachdeva sachdeva-shrey

🎯
Focusing
View GitHub Profile
@sachdeva-shrey
sachdeva-shrey / addContract.js
Created June 22, 2020 22:36
CiceroMark --> OOXML
const addToContract = async (templateIndex, templateUri) => {
/* global Word */
Word.run(async function (context) {
// load the template
const hashIndex = templateUri.indexOf('#');
const templateId = templateUri.substring(5, hashIndex);
const templateDetails = templateIndex[templateId];
const url = templateDetails.url;
@sachdeva-shrey
sachdeva-shrey / gallery.js
Last active February 23, 2020 12:33
Gallery Page
@sachdeva-shrey
sachdeva-shrey / image.js
Last active February 15, 2020 10:21
Lazy Image Loading
import React from "react"
import { StaticQuery, graphql } from "gatsby"
import Img from "gatsby-image"
const Image = props => (
<StaticQuery
query={graphql`
query {
images: allFile {
edges {