From 90211c49e27bd303139314d08dc892b01635d9f1 Mon Sep 17 00:00:00 2001 From: Vinay Puppal Date: Mon, 17 Apr 2017 10:30:27 +0530 Subject: [PATCH 01/95] fixes #5 and #4 --- components/Notification.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Notification.js b/components/Notification.js index 352a2ca..f908aeb 100644 --- a/components/Notification.js +++ b/components/Notification.js @@ -173,7 +173,7 @@ export default class Notification extends React.Component {
  • @@ -180,7 +178,11 @@ export default class Notification extends React.Component { />
    - +

    {this.state.message}

    ) diff --git a/components/FilterIcon.js b/components/FilterIcon.js index 916ffc3..08d643b 100644 --- a/components/FilterIcon.js +++ b/components/FilterIcon.js @@ -5,14 +5,12 @@ export default () => ( d='M246.744 13.984c-1.238-2.626-3.881-4.301-6.784-4.301H7.5c-2.903 0-5.545 1.675-6.784 4.301-1.238 2.626-.85 5.73.997 7.97l89.361 108.384v99.94c0 2.595 1.341 5.005 3.545 6.373 1.208.749 2.579 1.127 3.955 1.127 1.137 0 2.278-.259 3.33-.78l50.208-24.885c2.551-1.264 4.165-3.863 4.169-6.71l.098-75.062 89.366-108.388c1.848-2.239 2.237-5.344.999-7.969zM143.097 122.873c-1.105 1.34-1.711 3.023-1.713 4.761l-.096 73.103-35.213 17.453v-90.546c0-1.741-.605-3.428-1.713-4.771L23.404 24.682h200.651l-80.958 98.191z' /> ) diff --git a/components/Footer.js b/components/Footer.js index 9662cd1..c55dbb7 100644 --- a/components/Footer.js +++ b/components/Footer.js @@ -15,8 +15,7 @@ export default () => ( ☚

    ) diff --git a/components/GlobalStyles.js b/components/GlobalStyles.js index 575d6d0..96d705d 100644 --- a/components/GlobalStyles.js +++ b/components/GlobalStyles.js @@ -1,8 +1,7 @@ export default () => (
    ) diff --git a/components/Header.js b/components/Header.js index 2c6c5e0..0fb87f7 100644 --- a/components/Header.js +++ b/components/Header.js @@ -50,8 +50,7 @@ export default props => ( ) diff --git a/components/LinkCard.js b/components/LinkCard.js index d3bfa41..276a558 100644 --- a/components/LinkCard.js +++ b/components/LinkCard.js @@ -66,12 +66,8 @@ export default ({ link, query: { search } = {} } = {}) => { > Open - - + +
  • @@ -79,8 +75,7 @@ export default ({ link, query: { search } = {} } = {}) => { ) diff --git a/components/LinkIcon.js b/components/LinkIcon.js index 329bfc7..b622313 100644 --- a/components/LinkIcon.js +++ b/components/LinkIcon.js @@ -9,14 +9,12 @@ export default () => ( d='M167.967 335.151c-10.449-10.449-18.808-22.988-25.078-35.527-22.988-48.065-15.673-108.669 25.078-148.376L279.771 38.4c51.2-51.2 133.747-51.2 183.902 0 51.2 51.2 51.2 133.747 0 183.902l-79.412 79.412c9.404-31.347 8.359-64.784-3.135-95.086l33.437-33.437c22.988-22.988 22.988-61.649 0-85.682-24.033-24.033-61.649-24.033-85.682 0l-110.759 112.85c-11.494 11.494-17.763 27.167-17.763 42.841s6.269 31.347 17.763 42.841c11.494 11.494 27.167 17.763 42.841 17.763l-56.424 56.424c-13.584-6.269-25.078-14.628-36.572-25.077z' /> ) diff --git a/components/LinksList.js b/components/LinksList.js index bb448f6..f9e4b1e 100644 --- a/components/LinksList.js +++ b/components/LinksList.js @@ -4,9 +4,10 @@ import LinkCard from './LinkCard' import PageInfo from './PageInfo' import SearchBar from '../components/Search' -export default ( - { data: { links, isLastPage, totalLinks, perPage, page }, url } -) => { +export default ({ + data: { links, isLastPage, totalLinks, perPage, page }, + url +}) => { const { query } = url return (
    @@ -53,8 +54,7 @@ export default ( />
    ) diff --git a/components/Notification.js b/components/Notification.js index a994359..3b9c5cc 100644 --- a/components/Notification.js +++ b/components/Notification.js @@ -151,7 +151,8 @@ export default class Notification extends React.Component { } } saveSubscriptionID (subscription) { - var subscriptionId = subscription.endpoint.split('gcm/send/')[1] || + var subscriptionId = + subscription.endpoint.split('gcm/send/')[1] || subscription.endpoint.split(/\/wpush\/v\d\//)[1] console.log('Subscription ID', subscriptionId) @@ -202,8 +203,7 @@ export default class Notification extends React.Component {

    {this.state.message}

    ) diff --git a/components/PageInfo.js b/components/PageInfo.js index 75dfe68..09a0448 100644 --- a/components/PageInfo.js +++ b/components/PageInfo.js @@ -8,7 +8,7 @@ const renderInfo = (query, totalLinks) => { if (query.search) { return (

    - Total: {totalLinks} were found from + Total: {totalLinks} link/s were found from {' ' + `${format(Number(query.start), 'MMM Do')} to ${format(Number(query.end), 'MMM Do')} ${query.search ? `containing ${query.search} word` : ''}` + @@ -16,8 +16,7 @@ const renderInfo = (query, totalLinks) => { clear

    ) } else { return (

    - Total: {totalLinks} were found from + Total: {totalLinks} link/s were found from {' ' + `${format(Number(query.start), 'MMM Do')} to ${format(Number(query.end), 'MMM Do')}` + @@ -55,8 +53,7 @@ const renderInfo = (query, totalLinks) => { clear

    ) @@ -88,14 +84,13 @@ const renderInfo = (query, totalLinks) => { if (query && query.search) { return (

    - Total: {totalLinks} were found containing word + Total: {totalLinks} link/s were found containing word {' ' + query.search + ' '} clear

    ) } else { return (

    - Total: {totalLinks} were added till today. + Total: {totalLinks} link/s were added till today.

    ) @@ -154,8 +146,7 @@ export default ({ query, page, totalLinks }) => {

    Page: {page}

    ) diff --git a/components/Search.js b/components/Search.js index 9dccde9..9e10592 100644 --- a/components/Search.js +++ b/components/Search.js @@ -10,9 +10,7 @@ function getSuggestions (value) { const inputLength = inputValue.length return inputLength === 0 ? [] - : tags.filter( - tag => tag.toLowerCase().slice(0, inputLength) === inputValue - ) + : tags.filter(tag => tag.toLowerCase().slice(0, inputLength) === inputValue) } // When suggestion is clicked, Autosuggest needs to populate the input field diff --git a/components/Sidebar.js b/components/Sidebar.js index 05d0f6d..f0c55e7 100644 --- a/components/Sidebar.js +++ b/components/Sidebar.js @@ -271,8 +271,7 @@ export default props => { ) diff --git a/components/Snackbar.js b/components/Snackbar.js index 96f2a47..00d297f 100644 --- a/components/Snackbar.js +++ b/components/Snackbar.js @@ -17,13 +17,10 @@ export default class SnackBar extends Component { timer: nextProps.timer }) - setTimeout( - () => { - this.setState({ showSnackBar: false }) - this.props.onClose && this.props.onClose() - }, - timer - ) + setTimeout(() => { + this.setState({ showSnackBar: false }) + this.props.onClose && this.props.onClose() + }, timer) } } diff --git a/pages/about.js b/pages/about.js index f69d909..71cea9b 100644 --- a/pages/about.js +++ b/pages/about.js @@ -20,8 +20,7 @@ export default class About extends React.Component {