This commit is contained in:
Martina 2020-08-25 16:13:17 -07:00
parent 26f5904793
commit cf631f9956
3 changed files with 24 additions and 6 deletions

View File

@ -76,7 +76,7 @@ export default class Profile extends React.Component {
type: "NAVIGATE",
value: this.props.sceneId,
scene: "SLATE",
data: slate,
data: { owner: data, ...slate },
})
}
>

View File

@ -23,6 +23,7 @@ const moveIndex = (set, fromIndex, toIndex) => {
export default class SceneSlate extends React.Component {
state = {
name: this.props.data.data.name,
username: this.props.data.owner.username,
slatename: this.props.data.slatename,
public: this.props.data.data.public,
objects: this.props.data.data.objects,
@ -63,6 +64,7 @@ export default class SceneSlate extends React.Component {
}
this.setState({
username: this.props.data.owner.username,
slatename: this.props.data.slatename,
public: this.props.data.data.public,
objects: this.props.data.data.objects,
@ -264,13 +266,19 @@ export default class SceneSlate extends React.Component {
};
render() {
const { slatename, objects, body = "A slate.", name } = this.state;
const {
username,
slatename,
objects,
body = "A slate.",
name,
} = this.state;
return (
<ScenePage style={{ padding: `88px 24px 128px 24px` }}>
<ScenePageHeader
style={{ padding: `0 24px 0 24px` }}
title={name}
title={`${username} / ${name}`}
actions={
this.state.editing ? (
<React.Fragment>

View File

@ -31,14 +31,24 @@ export default class SceneSlates extends React.Component {
const slateButtons = [
{ name: "Create slate", type: "SIDEBAR", value: "SIDEBAR_CREATE_SLATE" },
];
console.log(this.props);
return (
<ScenePage>
<ScenePageHeader title="Slates">
This scene is currently a work in progress.
</ScenePageHeader>
{this.props.viewer.slates.map((slate) => (
<SlatePreviewBlock slate={slate} />
{this.props.data.children.map((slate) => (
<div
key={slate.id}
// onClick={() =>
// this.props.onAction({
// type: "NAVIGATE",
// value: slate.id,
// })
// }
>
<SlatePreviewBlock slate={slate} />
</div>
))}
</ScenePage>
);