This commit is contained in:
2020-08-22 11:35:29 +02:00
parent a37d5f8845
commit 12c3383b55
3 changed files with 13 additions and 2 deletions

View File

@@ -39,7 +39,6 @@ const encrypt = async (keys: string[], content: string) => {
const blob = new Blob([data], { const blob = new Blob([data], {
type: 'text/text', type: 'text/text',
}); });
//const url = URL.createObjectURL(blob);
return blob; return blob;
}; };

View File

@@ -1,6 +1,7 @@
import React, { createContext } from 'react'; import React, { createContext } from 'react';
const data = require('../../data.json'); const data = require('../../data.json');
console.log('d', data);
interface GithubContextType { interface GithubContextType {
username: string; username: string;
@@ -8,7 +9,15 @@ interface GithubContextType {
} }
const GithubContext = createContext<GithubContextType>(data); const GithubContext = createContext<GithubContextType>(data);
const GithubProvider = GithubContext.Provider; const GithubProvider: React.FC = ({
children,
}) => (
<GithubContext.Provider
value={{ data }}
>
{children}
</GithubContext.Provider>
);
export { export {
GithubProvider, GithubProvider,

View File

@@ -28,6 +28,9 @@ const config: Configuration = {
}, },
}, },
plugins: [ plugins: [
new webpack.DefinePlugin({
__DEV__: JSON.stringify(__DEV__),
}),
new WebpackPwaManifest({ new WebpackPwaManifest({
name: `Parcel for ${data.username}`, name: `Parcel for ${data.username}`,
short_name: 'parcel', short_name: 'parcel',