0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 22:52:40 +00:00

Fix 'Share to Reddit' link for Google brews

Fix 'Share to Reddit' generating incorrect links for brews stored on Google Drive
This commit is contained in:
Sean Robertson
2021-05-17 12:16:22 +12:00
parent 1ad46c1ba9
commit 34f620c59b

View File

@@ -67,10 +67,12 @@ const MetadataEditor = createClass({
getRedditLink : function(){
const meta = this.props.metadata;
const shareLink = (meta.googleID ? meta.googleId + meta.shareId : meta.shareId);
const title = `${meta.title} [${meta.systems.join(' ')}]`;
const text = `Hey guys! I've been working on this homebrew. I'd love your feedback. Check it out.
**[Homebrewery Link](http://homebrewery.naturalcrit.com/share/${meta.shareId})**`;
**[Homebrewery Link](http://homebrewery.naturalcrit.com/share/${shareLink})**`;
return `https://www.reddit.com/r/UnearthedArcana/submit?title=${encodeURIComponent(title)}&text=${encodeURIComponent(text)}`;
},