import * as React from "react"; import * as SVG from "~/common/svg"; import * as Events from "~/common/custom-events"; import * as Constants from "~/common/constants"; import * as Styles from "~/common/styles"; import { css } from "@emotion/react"; import { TabGroup, PrimaryTabGroup, SecondaryTabGroup } from "~/components/core/TabGroup"; import { ButtonSecondary } from "~/components/system/components/Buttons"; import { FileTypeGroup } from "~/components/core/FileTypeIcon"; import { Link } from "~/components/core/Link"; import ScenePage from "~/components/core/ScenePage"; import ScenePageHeader from "~/components/core/ScenePageHeader"; import CollectionPreviewBlock from "~/components/core/CollectionPreviewBlock"; import SquareButtonGray from "~/components/core/SquareButtonGray"; import EmptyState from "~/components/core/EmptyState"; import WebsitePrototypeWrapper from "~/components/core/WebsitePrototypeWrapper"; // TODO(jim): Slates design. export default class SceneSlates extends React.Component { _handleAdd = () => { this.props.onAction({ name: "Create slate", type: "SIDEBAR", value: "SIDEBAR_CREATE_SLATE", }); }; _handleSearch = () => { Events.dispatchCustomEvent({ name: "show-search", detail: {}, }); }; render() { const tab = this.props.page.params?.tab || "collections"; let subscriptions = this.props.viewer.subscriptions; return (
{tab === "collections" ? ( this.props.viewer.slates?.length ? (
{this.props.viewer.slates.map((slate) => ( ))}
) : (
Use collections to create mood boards, share files, and organize research.
Create collection
) ) : null} {tab === "subscribed" ? ( subscriptions && subscriptions.length ? (
{subscriptions.map((slate) => ( ))}
) : ( You can follow any public collections on the network. Browse collections ) ) : null}
); } }