mirror of
https://github.com/filecoin-project/slate.git
synced 2024-12-26 18:44:56 +03:00
fix: activity url
This commit is contained in:
parent
76efdcf1ea
commit
1ebcd04bc0
@ -44,7 +44,7 @@ export const navigation = [
|
||||
id: "NAV_ACTIVITY",
|
||||
decorator: "ACTIVITY",
|
||||
name: "Activity",
|
||||
pageTitle: "Welcome back!",
|
||||
pageTitle: "Activity",
|
||||
ignore: true,
|
||||
},
|
||||
{
|
||||
|
@ -185,7 +185,7 @@ export class GlobalCarousel extends React.Component {
|
||||
visible: true,
|
||||
index: e.detail.index || 0,
|
||||
});
|
||||
if (this.props.carouselType === "SLATE") {
|
||||
if (this.props.carouselType === "SLATE" || this.props.carouselType === "ACTIVITY") {
|
||||
const data = this.props.objects[e.detail.index];
|
||||
this.setWindowState(data.cid);
|
||||
}
|
||||
@ -210,7 +210,7 @@ export class GlobalCarousel extends React.Component {
|
||||
}
|
||||
this.setState({ index });
|
||||
|
||||
if (this.props.carouselType === "SLATE") {
|
||||
if (this.props.carouselType === "SLATE" || this.props.carouselType === "ACTIVITY") {
|
||||
const data = this.props.objects[index];
|
||||
this.setWindowState(data.cid);
|
||||
}
|
||||
@ -223,7 +223,7 @@ export class GlobalCarousel extends React.Component {
|
||||
}
|
||||
this.setState({ index });
|
||||
|
||||
if (this.props.carouselType === "SLATE") {
|
||||
if (this.props.carouselType === "SLATE" || this.props.carouselType === "ACTIVITY") {
|
||||
const data = this.props.objects[index];
|
||||
this.setWindowState(data.cid);
|
||||
}
|
||||
|
@ -271,6 +271,13 @@ export default class SceneActivity extends React.Component {
|
||||
|
||||
fetchActivityItems = async (update = false) => {
|
||||
this.setState({ loading: "loading" });
|
||||
|
||||
window.history.replaceState(
|
||||
{ ...window.history.state },
|
||||
"Slate",
|
||||
`/${this.props.viewer.username}/activity`
|
||||
);
|
||||
|
||||
let activity =
|
||||
this.props.tab === 0 ? this.props.viewer.activity || [] : this.props.viewer.explore || [];
|
||||
let response;
|
||||
|
Loading…
Reference in New Issue
Block a user