mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-04 23:22:42 +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:
@@ -67,10 +67,12 @@ const MetadataEditor = createClass({
|
|||||||
|
|
||||||
getRedditLink : function(){
|
getRedditLink : function(){
|
||||||
const meta = this.props.metadata;
|
const meta = this.props.metadata;
|
||||||
|
|
||||||
|
const shareLink = (meta.googleID ? meta.googleId + meta.shareId : meta.shareId);
|
||||||
const title = `${meta.title} [${meta.systems.join(' ')}]`;
|
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.
|
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)}`;
|
return `https://www.reddit.com/r/UnearthedArcana/submit?title=${encodeURIComponent(title)}&text=${encodeURIComponent(text)}`;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user