{
- window.open("https://filscan.io/");
- }}
style={{ marginTop: 48 }}
- >
-
- Block Explorer
-
- {
window.open("https://github.com/filecoin-project/slate");
}}
diff --git a/pages/system/index.js b/pages/system/index.js
index 01760e31..6f671f33 100644
--- a/pages/system/index.js
+++ b/pages/system/index.js
@@ -76,6 +76,40 @@ export default class SystemPageRoot extends React.Component {
{`import { ButtonPrimary } from 'slate-react-system'
const Component = () =>
Hello World`}
+
+
+
+ And easily integrate Powergate
+
+
+ {`import * as React from 'react';
+import * as System from 'slate-react-system';
+import { createPow } from "@textile/powergate-client";
+
+class Example extends React.Component {
+ _PG = null;
+
+ state = {
+ token: null
+ }
+
+ _handleCreateToken = () => {
+ this._PG = createPow({ host: 'http://0.0.0.0:6002' });
+ const FFS = await this._PG.ffs.create();
+ const token = FFS.token ? FFS.token : null;
+ PowerGate.setToken(token);
+ this.setState({ token });
+ }
+
+ render() {
+ return (
+
+ );
+ }
+}
+`}
@@ -106,48 +140,7 @@ const Component = () =>
Hello World`}
.
-
-
How do I use Slate?
-
-
- If you are running this{" "}
-
- repository locally
-
- , visit https://localhost:1337 in your browser. If you are redirected
- here, that means you have not followed all of the instructions or
- something went wrong on our end.
-
-
-
-
-
License
-
-
- Copyright © 2020 Protocol Labs
-
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
);
}