mirror of
https://github.com/filecoin-project/slate.git
synced 2024-12-26 02:24:44 +03:00
49 lines
1.3 KiB
JavaScript
49 lines
1.3 KiB
JavaScript
import * as React from "react";
|
|
import * as Constants from "~/common/constants";
|
|
|
|
import { css } from "@emotion/react";
|
|
|
|
import Profile from "~/components/core/Profile";
|
|
import WebsitePrototypeWrapper from "~/components/core/WebsitePrototypeWrapper";
|
|
import WebsitePrototypeHeader from "~/components/core/WebsitePrototypeHeader";
|
|
import WebsitePrototypeFooter from "~/components/core/WebsitePrototypeFooter";
|
|
|
|
export const getServerSideProps = async (context) => {
|
|
return {
|
|
props: { ...context.query },
|
|
};
|
|
};
|
|
|
|
const STYLES_ROOT = css`
|
|
display: grid;
|
|
grid-template-rows: auto 1fr auto;
|
|
text-align: center;
|
|
font-size: 1rem;
|
|
min-height: 100vh;
|
|
`;
|
|
|
|
export default class ProfilePage extends React.Component {
|
|
render() {
|
|
const title = this.props.creator ? `${this.props.creator.username}` : "404";
|
|
const url = `https://slate.host/${title}`;
|
|
const description = this.props.creator.data.body;
|
|
|
|
return (
|
|
<WebsitePrototypeWrapper
|
|
title={title}
|
|
description={description}
|
|
url={url}
|
|
image={this.props.creator.data.photo}
|
|
>
|
|
<div css={STYLES_ROOT}>
|
|
<WebsitePrototypeHeader />
|
|
<div style={{ margin: "80px 24px 0px 24px" }}>
|
|
<Profile {...this.props} />
|
|
</div>
|
|
<WebsitePrototypeFooter />
|
|
</div>
|
|
</WebsitePrototypeWrapper>
|
|
);
|
|
}
|
|
}
|