safe local storage access

This commit is contained in:
Jan Halfar 2021-12-02 09:09:39 +01:00
parent cef1cb0f74
commit 428eb8b8bf

View File

@ -1,5 +1,10 @@
import React, { useState } from "react";
if(typeof localStorage == "undefined") {
var localStorage = {setItem:(name, value) => {}, getItem: (name) => {return null}};
}
export const IsItCool = (props: {
children: any;
topic: string;