This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "presets": [ | |
| [ | |
| "env", | |
| { | |
| "targets": { | |
| "browsers": [ | |
| "last 2 versions", | |
| "ie > 9" | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| export default ({ isTruthy }) => ( | |
| <div> | |
| {isTruthy && <p>Print sth since prop isTruthy is really truthy</p>} | |
| </div> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| export default ({ items }) => ( | |
| <div> | |
| {items.length && <p>Print sth since we have some items in our list</p>} | |
| </div> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| export default ({ items }) => ( | |
| <div> | |
| {Boolean(items.length) && <p>Print sth since we have some items in our list</p>} | |
| </div> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| export default ({ items }) => ( | |
| <div> | |
| {!!items.length && <p>Print sth since we have some items in our list</p>} | |
| </div> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| export default ({ items }) => ( | |
| <div> | |
| {items.length > 0 && <p>Print sth since we have some items in our list</p>} | |
| </div> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| export default ({ items }) => ( | |
| <div> | |
| {items.length > 0 ? <p>Print sth since we have some items in our list</p> : null} | |
| </div> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| const renderItemsText = items => { | |
| if (items.length > 0) { | |
| return <p>Print sth since we have some items in our list</p>; | |
| } | |
| return null; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| const renderItemsText = items => ( | |
| items.length > 0 ? <p>Print sth since we have some items in our list</p> : null | |
| ); | |
| export default ({ items }) => ( | |
| <div> | |
| {renderItemsText(items)} | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import request from 'utils/request'; | |
| export const uploadFileRequest = ({ file }) => { | |
| const data = new FormData(); | |
| data.append('file', file, file.name); | |
| return request.post(`/files`, data, { | |
| headers: { | |
| 'Content-Type': `multipart/form-data; boundary=${data._boundary}`, | |
| }, |