following slates added

This commit is contained in:
Martina 2020-09-02 16:24:10 -07:00
parent 77b428f97a
commit b43b08ee30

View File

@ -56,6 +56,25 @@ export default class SceneSlates extends React.Component {
}; };
}); });
let subscriptions = this.props.viewer.subscriptions
.filter((each) => {
return !!each.target_slate_id;
})
.map((relation) => (
<div
key={relation.slate.id}
onClick={() =>
this.props.onAction({
type: "NAVIGATE",
value: "V1_NAVIGATION_SLATE",
data: relation.slate,
})
}
>
<SlatePreviewBlock slate={relation.slate} />
</div>
));
// TODO(jim): Refactor later. // TODO(jim): Refactor later.
const slateButtons = [ const slateButtons = [
{ name: "Create slate", type: "SIDEBAR", value: "SIDEBAR_CREATE_SLATE" }, { name: "Create slate", type: "SIDEBAR", value: "SIDEBAR_CREATE_SLATE" },
@ -106,28 +125,15 @@ export default class SceneSlates extends React.Component {
) )
) : null} ) : null}
{this.state.tab === 1 ? ( {this.state.tab === 1 ? (
<EmptyState style={{ marginTop: 88 }}> subscriptions.length ? (
This feature is coming soon. subscriptions
</EmptyState> ) : (
<EmptyState style={{ marginTop: 88 }}>
You aren't following any slates yet! Get started by following any
slates you encounter that you want to be updated on
</EmptyState>
)
) : null} ) : null}
{this.props.viewer.subscriptions
.filter((each) => {
return !!each.target_slate_id;
})
.map((relation) => (
<div
key={relation.slate.id}
onClick={() =>
this.props.onAction({
type: "NAVIGATE",
value: "V1_NAVIGATION_SLATE",
data: relation.slate,
})
}
>
<SlatePreviewBlock slate={relation.slate} />
</div>
))}
</ScenePage> </ScenePage>
); );
} }