diff --git a/.changeset/honest-swans-swim.md b/.changeset/honest-swans-swim.md new file mode 100644 index 00000000..b86cf8b8 --- /dev/null +++ b/.changeset/honest-swans-swim.md @@ -0,0 +1,13 @@ +--- +"react-share": patch +--- + +Remove "web" element from path for RedditShareButton + +Current issue: +- The current share url leads to a "Page not found" error, making sharing to Reddit impossible +- Example: https://www.reddit.com/web/submit?url=http%3A%2F%2Flocalhost%3A3000%2Fblog%2Fblog-post&title=Blog+post&type=LINK + +Fix: +- Changed the path so it works correctly +- Example: https://www.reddit.com/submit?url=http%3A%2F%2Flocalhost%3A3000%2Fblog%2Fblog-post&title=Blog+post&type=LINK diff --git a/src/RedditShareButton.ts b/src/RedditShareButton.ts index a23af744..7d392b8f 100644 --- a/src/RedditShareButton.ts +++ b/src/RedditShareButton.ts @@ -6,7 +6,7 @@ function redditLink(url: string, { title }: { title?: string }) { assert(url, 'reddit.url'); return ( - 'https://www.reddit.com/web/submit' + + 'https://www.reddit.com/submit' + objectToGetParams({ url, title,