Copy directly to clipboard

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@walnut1·
0.000 HBD
Copy directly to clipboard
** Try it out right here^^^.  Click "copy short-link" 
Link to PR is [here](https://github.com/utopian-io/utopian.io/pull/235)

This is the last of my recent bug bashes for the Utopian.io frontend in order to get more familiar with the codebase.

This solves the issue of the `Copy Short Link` not acting the way users expect.  With this pull request, when a user hits the `Copy Short Link` text, the text will be automatically copied to their clipboard through the use of [react-copy-to-clipboard](https://www.npmjs.com/package/react-copy-to-clipboard).  It also shows some feedback that lets the user know the text was copied which lasts for two seconds.

Note that with the added `react-copy-to-clipboard` dependency you will need to run `npm install` for this to work.

![out](https://user-images.githubusercontent.com/9692067/34414520-bb07e232-ebb7-11e7-9c81-dc68fd25f08a.gif)

  And proof of work below:
![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1515108231/dtzpgjhujj8wdey2hqtm.png)


<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@walnut1/5hn3nb-copy-directly-to-clipboard">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍 , , , , , , , , , , , , ,