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], {
|
const blob = new Blob([data], {
|
||||||
type: 'text/text',
|
type: 'text/text',
|
||||||
});
|
});
|
||||||
//const url = URL.createObjectURL(blob);
|
|
||||||
return blob;
|
return blob;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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',
|
||||||
|
|||||||
Reference in New Issue
Block a user