├── .npmignore ├── .gitignore ├── README.md ├── mineshaftContext.js └── package.json /.npmignore: -------------------------------------------------------------------------------- 1 | !dist 2 | yarn.lock 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.swp 3 | package-lock.json 4 | yarn.lock 5 | dist 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | @jimpick/filecoin-pickaxe-mineshaft-context 2 | =========================================== 3 | 4 | React context provider for the mineshaft 5 | 6 | # License 7 | 8 | MIT 9 | -------------------------------------------------------------------------------- /mineshaftContext.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react' 2 | import { getMineshaft } from '@jimpick/filecoin-pickaxe-mineshaft' 3 | 4 | const MineshaftContext = React.createContext() 5 | 6 | export function ConnectMineshaft ({ children }) { 7 | return ( 8 | 9 | {children} 10 | 11 | ) 12 | } 13 | 14 | export default MineshaftContext 15 | 16 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@jimpick/filecoin-pickaxe-mineshaft-context", 3 | "version": "0.0.3", 4 | "description": "React context provider for the mineshaft", 5 | "main": "dist/mineshaftContext.js", 6 | "module": "./mineshaftContext.js", 7 | "type": "module", 8 | "scripts": { 9 | "build": "babel *.js --out-dir ./dist", 10 | "prepublish": "npm run build" 11 | }, 12 | "keywords": [], 13 | "author": "Jim Pick (@jimpick)", 14 | "license": "MIT", 15 | "peerDependencies": { 16 | "@jimpick/filecoin-pickaxe-mineshaft": "^0.0.9", 17 | "react": "^16.8.6" 18 | }, 19 | "devDependencies": { 20 | "@babel/cli": "^7.5.5", 21 | "@babel/core": "^7.5.5", 22 | "@babel/preset-env": "^7.5.5", 23 | "@babel/preset-react": "^7.0.0" 24 | }, 25 | "babel": { 26 | "presets": [ 27 | "@babel/preset-env", 28 | "@babel/preset-react" 29 | ], 30 | "sourceMaps": "inline" 31 | }, 32 | "browserslist": "node 10", 33 | "repository": { 34 | "type": "git", 35 | "url": "git+https://github.com/jimpick/filecoin-pickaxe-mineshaft-context.git" 36 | } 37 | } 38 | --------------------------------------------------------------------------------