From 12c3383b556a7d84b0cc813ea8da39152e5a1dd6 Mon Sep 17 00:00:00 2001 From: Morten Olsen Date: Sat, 22 Aug 2020 11:35:29 +0200 Subject: [PATCH] update --- src/contexts/Encryption.tsx | 1 - src/contexts/Github.tsx | 11 ++++++++++- webpack.config.ts | 3 +++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/contexts/Encryption.tsx b/src/contexts/Encryption.tsx index d2d88c0..afd3cb6 100644 --- a/src/contexts/Encryption.tsx +++ b/src/contexts/Encryption.tsx @@ -39,7 +39,6 @@ const encrypt = async (keys: string[], content: string) => { const blob = new Blob([data], { type: 'text/text', }); - //const url = URL.createObjectURL(blob); return blob; }; diff --git a/src/contexts/Github.tsx b/src/contexts/Github.tsx index b03be1d..7eb76ab 100644 --- a/src/contexts/Github.tsx +++ b/src/contexts/Github.tsx @@ -1,6 +1,7 @@ import React, { createContext } from 'react'; const data = require('../../data.json'); +console.log('d', data); interface GithubContextType { username: string; @@ -8,7 +9,15 @@ interface GithubContextType { } const GithubContext = createContext(data); -const GithubProvider = GithubContext.Provider; +const GithubProvider: React.FC = ({ + children, +}) => ( + + {children} + +); export { GithubProvider, diff --git a/webpack.config.ts b/webpack.config.ts index 68778d5..e0d0cf3 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -28,6 +28,9 @@ const config: Configuration = { }, }, plugins: [ + new webpack.DefinePlugin({ + __DEV__: JSON.stringify(__DEV__), + }), new WebpackPwaManifest({ name: `Parcel for ${data.username}`, short_name: 'parcel',