From 90211c49e27bd303139314d08dc892b01635d9f1 Mon Sep 17 00:00:00 2001
From: Vinay Puppal {this.state.message}
{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 { ) diff --git a/pages/index.js b/pages/index.js index b88896b..31336f9 100644 --- a/pages/index.js +++ b/pages/index.js @@ -146,8 +146,7 @@ class Home extends Component { } ) diff --git a/pages/my-links.js b/pages/my-links.js index a7b9baa..9dd2c04 100644 --- a/pages/my-links.js +++ b/pages/my-links.js @@ -153,8 +153,7 @@ class MyLinks extends Component { } ) diff --git a/pages/profile.js b/pages/profile.js index 129a966..d75bad8 100644 --- a/pages/profile.js +++ b/pages/profile.js @@ -86,8 +86,7 @@ class Profile extends React.Component { } ) diff --git a/pages/submit-link.js b/pages/submit-link.js index 711a864..eb46c97 100644 --- a/pages/submit-link.js +++ b/pages/submit-link.js @@ -60,7 +60,8 @@ class SubmitLink extends React.Component { let message console.log(e.response) if (e.response.data.code === 11000) { - message = 'Sorry, its seems like this link already exist in linklet!...' + message = + 'Sorry, its seems like this link already exist in linklet!...' } else { message = e.message } @@ -135,8 +136,7 @@ class SubmitLink extends React.Component {{this.state.info}
) diff --git a/utils/authenticate.js b/utils/authenticate.js index c4afdf7..6788483 100644 --- a/utils/authenticate.js +++ b/utils/authenticate.js @@ -38,9 +38,7 @@ export async function loadUser ({ req, res }) { if (!req) { // client side if (loginToken) { - const localUser = JSON.parse( - window.localStorage.getItem('sharedState') - ) + const localUser = JSON.parse(window.localStorage.getItem('sharedState')) if (localUser && loadUser._id) { return { user: localUser, From a3eaa4884384a59bf182eadc54b8f08aa5c5768b Mon Sep 17 00:00:00 2001 From: Vinay Puppal{this.state.message}
+{this.state.message}
+{this.state.message}
++ {this.state.message} +
+) export default class BottomBar extends React.Component { constructor (props) { @@ -63,96 +64,105 @@ export default class BottomBar extends React.Component {- {this.state.message} -
+{this.state.message}
+) diff --git a/components/LoadingCard.js b/components/LoadingCard.js index b1317ff..9f219b4 100644 --- a/components/LoadingCard.js +++ b/components/LoadingCard.js @@ -1,4 +1,4 @@ -export default () => +export default () => (
- {link.description
- ?
- {this.state.message} -
+{this.state.message}
+{this.state.error}
- {!this.state.showPreview && ( -{this.state.info}