data: fixes previews

This commit is contained in:
jimmylee 2020-08-10 03:18:43 -07:00
parent 9806f30942
commit b40aae9865
3 changed files with 9 additions and 4 deletions

View File

@ -460,6 +460,7 @@ export default class ApplicationPage extends React.Component {
const navigation = NavigationData.generate(this.state.viewer);
const next = this.state.history[this.state.currentIndex];
const current = NavigationData.getCurrentById(navigation, next.id);
console.log(current);
const navigationElement = (
<ApplicationNavigation
@ -473,7 +474,7 @@ export default class ApplicationPage extends React.Component {
/>
);
const headerElement = (
let headerElement = (
<ApplicationHeader
viewer={this.state.viewer}
pageTitle={current.target.pageTitle}
@ -484,6 +485,10 @@ export default class ApplicationPage extends React.Component {
/>
);
if (current.target.decorator === "FILE") {
headerElement = null;
}
const scene = React.cloneElement(this.scenes[current.target.decorator], {
current: current.target,
data: this.state.data,

View File

@ -12,7 +12,7 @@ const STYLES_FLEX = css`
align-items: center;
justify-content: space-between;
flex-direction: column;
height: calc(100vh - ${Constants.sizes.header}px);
height: 100vh;
background-color: ${Constants.system.pitchBlack};
`;

View File

@ -75,10 +75,10 @@ export default class SceneFilesFolder extends React.Component {
{
key: "size",
name: "Size",
width: "116px",
width: "84px",
type: "FILE_SIZE",
},
{ key: "type", name: "Type", type: "TEXT_TAG", width: "136px" },
{ key: "type", name: "Type", type: "TEXT_TAG", width: "172px" },
{
key: "networks",
name: "Networks",