Skip to content

Commit

Permalink
fix project page
Browse files Browse the repository at this point in the history
  • Loading branch information
Ianyourgod committed Nov 29, 2024
1 parent 4b1797c commit ab8a142
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions src/lib/tw-project-meta-fetcher-hoc.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const TWProjectMetaFetcherHOC = function (WrappedComponent) {
this.props.onSetDescription(instructions, credits);
}
if (
String(rawData.remix) !== '0' // checks isRemix and remixId existing at the same time
rawData.public === true
) {
this.props.onSetExtraProjectInfo(
rawData.public,
Expand All @@ -114,25 +114,27 @@ const TWProjectMetaFetcherHOC = function (WrappedComponent) {
new Date(rawData.lastUpdate),
rawData.lastUpdate !== rawData.date
);
// this is a remix, find the original project
fetchProjectMeta(rawData.remix)
.then(remixProject => {
// If project ID changed, ignore the results.
if (this.props.projectId !== projectId) {
console.log("hi skibward");
return;
}

this.props.onSetRemixedProjectInfo(
true, // loaded
remixProject.title,
remixProject.author.username
);
})
.catch(err => {
// this isnt fatal, just log
log.warn('cannot fetch remixed project meta for this project;', err);
});
if (String(rawData.remix) !== '0') {
// this is a remix, find the original project
fetchProjectMeta(rawData.remix)
.then(remixProject => {
// If project ID changed, ignore the results.
if (this.props.projectId !== projectId) {
return;
}

this.props.onSetRemixedProjectInfo(
true, // loaded
remixProject.title,
remixProject.author.username
);
})
.catch(err => {
// this isnt fatal, just log
log.warn('cannot fetch remixed project meta for this project;', err);
});
}
}
setIndexable(true);
})
Expand Down

1 comment on commit ab8a142

@NotEmbin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they killed skibward...

Please sign in to comment.