@@ -222,18 +210,7 @@ class NodeReference extends React.Component {
};
render() {
- const {
- id,
- activeId,
- activeIds,
- level,
- children,
- treeChildren,
- activePage,
- decorator,
- onNavigateTo,
- data,
- } = this.props;
+ const { id, activeId, activeIds, level, children, treeChildren, decorator, onNavigateTo, data } = this.props;
const { showTreeChildren } = this.state;
let showActive = showTreeChildren || activeIds[id];
@@ -311,17 +288,15 @@ export default class ApplicationNavigation extends React.Component {
}
/>
-
-
-
- {this.props.viewer.username}
-
-
+
+
+ {this.props.viewer.username}
+
{this.props.navigation.map((each) => {
if (!each) {
diff --git a/scenes/SceneSettingsDeveloper.js b/scenes/SceneSettingsDeveloper.js
index aac6646a..4518c866 100644
--- a/scenes/SceneSettingsDeveloper.js
+++ b/scenes/SceneSettingsDeveloper.js
@@ -54,9 +54,7 @@ class Key extends React.Component {
{this.state.visible ? (
{this.props.data.key}
) : (
-
- XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXXX
-
+ XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXXX
)}
+ backgroundColor: this.state.visible ? null : Constants.system.brand,
+ }}>
- this.props.onDelete(this.props.data.id)}
- >
+ this.props.onDelete(this.props.data.id)}>
@@ -83,12 +75,7 @@ class Key extends React.Component {
}
}
-const EXAMPLE_GET_SLATE = (
- key,
- slateId
-) => `// NOTE: set a slate by ID in an async/await function
-
-const response = await fetch('https://slate.host/api/v1/get-slate', {
+const EXAMPLE_GET_SLATE = (key, slateId) => `const response = await fetch('https://slate.host/api/v1/get-slate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -104,11 +91,7 @@ const response = await fetch('https://slate.host/api/v1/get-slate', {
const json = await response.json();
console.log(json);`;
-const EXAMPLE_GET = (
- key
-) => `// NOTE: set a slate by ID in an async/await function
-
-const response = await fetch('https://slate.host/api/v1/get', {
+const EXAMPLE_GET = (key) => `const response = await fetch('https://slate.host/api/v1/get', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -124,12 +107,7 @@ const response = await fetch('https://slate.host/api/v1/get', {
const json = await response.json();
console.log(json);`;
-const EXAMPLE_GET_SLATE_RESPONSE = (
- key,
- slateId
-) => `// NOTE: get a slate by ID JSON response
-
-{
+const EXAMPLE_GET_SLATE_RESPONSE = (key, slateId) => `{
data: {
id: '${slateId}',
updated_at: '2020-07-27T09:04:53.007Z',
@@ -152,12 +130,7 @@ const EXAMPLE_GET_SLATE_RESPONSE = (
}
}`;
-const EXAMPLE_UPLOAD_TO_SLATE = (key, slateId) => `// NOTE
-// Upload data to a Slate by ID in an async/await function.
-// Uses event data from a type="file" input.
-
-// NOTE: your slate ID
-const url = 'https://slate.host/api/v1/upload-data/${slateId}';
+const EXAMPLE_UPLOAD_TO_SLATE = (key, slateId) => `const url = 'https://slate.host/api/v1/upload-data/${slateId}';
let file = e.target.files[0];
let data = new FormData();
@@ -174,7 +147,7 @@ const response = await fetch(url, {
const json = await response.json();
-// NOTE: you will receive a URL you can use right away.
+// NOTE: the URL to your asset will be available in the JSON response.
console.log(json);`;
export default class SceneSettingsDeveloper extends React.Component {
@@ -200,11 +173,7 @@ export default class SceneSettingsDeveloper extends React.Component {
_handleDelete = async (id) => {
this.setState({ loading: true });
- if (
- !window.confirm(
- "Are you sure you want to delete this key? This action is irreversible"
- )
- ) {
+ if (!window.confirm("Are you sure you want to delete this key? This action is irreversible")) {
this.setState({ loading: false });
return;
}
@@ -270,10 +239,7 @@ export default class SceneSettingsDeveloper extends React.Component {
})}
-
+
Generate
@@ -286,10 +252,7 @@ export default class SceneSettingsDeveloper extends React.Component {
label="Get all slates"
description="This API request will return all of your public slates."
/>
-
+
-
+
-
+
-
+
) : null}