removed explore slates

This commit is contained in:
Martina 2021-01-21 23:05:07 -08:00
parent f372515329
commit 05c56313d3
3 changed files with 44 additions and 65 deletions

View File

@ -313,7 +313,7 @@ export default class Profile extends React.Component {
let username = this.state.slateTab === 0 ? creator.username : null;
let subscriptions = this.props.creator.subscriptions || [];
let subscribers = this.props.creator.subscribers || [];
let exploreSlates = this.props.exploreSlates;
// let exploreSlates = this.props.exploreSlates;
console.log(this.props.onAction, exploreSlates);
@ -585,7 +585,13 @@ export default class Profile extends React.Component {
/>
) : (
<React.Fragment>
{this.props.external ? (
<EmptyState>
<SVG.Slate height="24px" style={{ marginBottom: 24 }} />
{this.state.slateTab === 0
? `This user does not have any public slates yet`
: `This user is not following any slates yet`}
</EmptyState>
{/* {this.props.external ? (
<React.Fragment>
<EmptyState style={{ border: `none`, height: `120px` }}>
<SVG.Slate height="24px" style={{ marginBottom: 24 }} />
@ -602,14 +608,7 @@ export default class Profile extends React.Component {
onAction={this.props.onAction}
/>
</React.Fragment>
) : (
<EmptyState>
<SVG.Slate height="24px" style={{ marginBottom: 24 }} />
{this.state.slateTab === 0
? `This user does not have any public slates yet`
: `This user is not following any slates yet`}
</EmptyState>
)}
) : null} */}
</React.Fragment>
)}
</div>

View File

@ -279,26 +279,6 @@ export default class SceneDirectory extends React.Component {
value={this.props.tab}
onAction={this.props.onAction}
/>
{/* {this.props.tab === 0 ? (
requests && requests.length ? (
requests
) : (
<EmptyState>
<SVG.Users height="24px" style={{ marginBottom: 24 }} />
Trust requests that you receive will appear here.
</EmptyState>
)
) : null}
{this.props.tab === 1 ? (
trusted && trusted.length ? (
trusted
) : (
<EmptyState>
<SVG.Users height="24px" style={{ marginBottom: 24 }} />
Trusted is for your close friends.
</EmptyState>
)
) : null} */}
{this.props.tab === 0 ? (
following && following.length ? (
following

View File

@ -330,50 +330,50 @@ app.prepare().then(async () => {
creator.subscribers = r2.serializedSubscribers;
let exploreSlates = [];
// let exploreSlates = [];
if (Environment.IS_PRODUCTION) {
exploreSlates = await Data.getSlatesByIds({
ids: [
//NOTE(tara): slates in prod
"d2861ac4-fc41-4c07-8f21-d0bf06be364c",
"9c2c458c-d92a-4e81-a4b6-bf6ab4607470",
"7f461144-0647-43d7-8294-788b37ae5979",
"f72c2594-b8ac-41f6-91e0-b2da6788ae23",
"a0d6e2f2-564d-47ed-bf56-13c42634703d",
"0ba92c73-92e7-4b00-900e-afae4856c9ea",
],
});
// if (Environment.IS_PRODUCTION) {
// exploreSlates = await Data.getSlatesByIds({
// ids: [
// //NOTE(tara): slates in prod
// "d2861ac4-fc41-4c07-8f21-d0bf06be364c",
// "9c2c458c-d92a-4e81-a4b6-bf6ab4607470",
// "7f461144-0647-43d7-8294-788b37ae5979",
// "f72c2594-b8ac-41f6-91e0-b2da6788ae23",
// "a0d6e2f2-564d-47ed-bf56-13c42634703d",
// "0ba92c73-92e7-4b00-900e-afae4856c9ea",
// ],
// });
for (let exploreSlate of exploreSlates) {
let user = await Data.getUserById({ id: exploreSlate.data.ownerId });
exploreSlate.username = user.username;
}
} else {
exploreSlates = await Data.getSlatesByIds({
ids: [
//NOTE(tara): slates in localhost for testing
"857ad84d-7eff-4861-a988-65c84b62fc23",
"81fa0b39-0e96-4c7f-8587-38468bb67cb3",
"c4e8dad7-4ba0-4f25-a92a-c73ef5522d29",
"df05cb1f-2ecf-4872-b111-c4b8493d08f8",
"435035e6-dee4-4bbf-9521-64c219a527e7",
"ac907aa3-2fb2-46fd-8eba-ec8ceb87b5eb",
],
});
// for (let exploreSlate of exploreSlates) {
// let user = await Data.getUserById({ id: exploreSlate.data.ownerId });
// exploreSlate.username = user.username;
// }
// } else {
// exploreSlates = await Data.getSlatesByIds({
// ids: [
// //NOTE(tara): slates in localhost for testing
// "857ad84d-7eff-4861-a988-65c84b62fc23",
// "81fa0b39-0e96-4c7f-8587-38468bb67cb3",
// "c4e8dad7-4ba0-4f25-a92a-c73ef5522d29",
// "df05cb1f-2ecf-4872-b111-c4b8493d08f8",
// "435035e6-dee4-4bbf-9521-64c219a527e7",
// "ac907aa3-2fb2-46fd-8eba-ec8ceb87b5eb",
// ],
// });
for (let exploreSlate of exploreSlates) {
let user = await Data.getUserById({ id: exploreSlate.data.ownerId });
exploreSlate.username = user.username;
}
}
// for (let exploreSlate of exploreSlates) {
// let user = await Data.getUserById({ id: exploreSlate.data.ownerId });
// exploreSlate.username = user.username;
// }
// }
return app.render(req, res, "/_/profile", {
viewer,
creator,
mobile,
resources: EXTERNAL_RESOURCES,
exploreSlates,
// exploreSlates,
});
});