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 { globalStyle, GlobalStyleRule } from "@vanilla-extract/css"; | |
| interface RecursiveGlobalStyle { | |
| [k: string]: GlobalStyleRule | RecursiveGlobalStyle; | |
| } | |
| function globalUtil(selector: string, styles: RecursiveGlobalStyle) { | |
| const write = ( | |
| key: string[], | |
| value: RecursiveGlobalStyle | GlobalStyleRule |
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 React from "react"; | |
| import { Link } from "react-router-dom"; | |
| export function createResource(getPromise) { | |
| let cache = {}; | |
| let inflight = {}; | |
| function load(key) { | |
| inflight[key] = getPromise(key).then(val => { | |
| delete inflight[key]; |