-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(share): add share component #335
Conversation
/> | ||
<h1 className={styles.title}>Share with the world</h1> | ||
<div className={styles.shareButtons}> | ||
<a href={'#'} target={'blank'} className={styles.button}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what exactly should be shared on youtube or instagram.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also no idea! Youtube makes no sense and I have no idea how instagram works :)
|
||
export const CopyIcon: FunctionComponent = () => ( | ||
<svg | ||
width="23" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All our icons should be 24x24 (if not 24px they should have at least quadratic dimensions)
|
||
export const TwitterIcon: FunctionComponent = () => ( | ||
<svg | ||
width="27" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here: wrong size
import {ShareIcon} from '../icons/share-icon'; | ||
import config from '../../config/main'; | ||
|
||
import styles from './share.styl'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong import order
import config from '../../config/main'; | ||
|
||
import styles from './share.styl'; | ||
import {FormattedMessage} from 'react-intl'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong order
@@ -33,7 +33,11 @@ export default { | |||
storyOfflinePackage: `https://storage.googleapis.com/esa-cfs-storage/${version}/stories/{id}/package.zip`, | |||
storyMediaBase: `https://storage.googleapis.com/esa-cfs-storage/${version}/stories/{id}`, | |||
stories: `https://storage.googleapis.com/esa-cfs-storage/${version}/stories/stories-{lang}.json`, | |||
story: `https://storage.googleapis.com/esa-cfs-storage/${version}/stories/{id}/{id}-{lang}.json` | |||
story: `https://storage.googleapis.com/esa-cfs-storage/${version}/stories/{id}/{id}-{lang}.json`, | |||
facebook: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are not api urls. Please create a separate section 'share' for them
onClick={() => setShowShare(true)} | ||
/> | ||
{showShare && ( | ||
<Overlay showCloseButton={false} onClose={() => {}}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is onClose an empty function? Better mark it optional and give it an empty function as its default value
className={styles.closeButton} | ||
onClick={() => setShowShare(false)} | ||
/> | ||
<h1 className={styles.title}>Share with the world</h1> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing translations
/> | ||
<h1 className={styles.title}>Share with the world</h1> | ||
<div className={styles.shareButtons}> | ||
<a href={'#'} target={'blank'} className={styles.button}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing underscore before _blank
?
/> | ||
<h1 className={styles.title}>Share with the world</h1> | ||
<div className={styles.shareButtons}> | ||
<a href={'#'} target={'blank'} className={styles.button}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also no idea! Youtube makes no sense and I have no idea how instagram works :)
<InstagramIcon /> | ||
<span>Instagram</span> | ||
</a> | ||
<button |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need some feedback here that the link has been copied.
No description provided.