mirror of
https://github.com/morten-olsen/parcel.git
synced 2026-02-08 01:36:24 +01:00
update
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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<GithubContextType>(data);
|
||||
const GithubProvider = GithubContext.Provider;
|
||||
const GithubProvider: React.FC = ({
|
||||
children,
|
||||
}) => (
|
||||
<GithubContext.Provider
|
||||
value={{ data }}
|
||||
>
|
||||
{children}
|
||||
</GithubContext.Provider>
|
||||
);
|
||||
|
||||
export {
|
||||
GithubProvider,
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user