mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-23 22:12:19 +03:00
commit
This commit is contained in:
parent
26f5904793
commit
cf631f9956
@ -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 },
|
||||
})
|
||||
}
|
||||
>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user