File tree Expand file tree Collapse file tree 6 files changed +11
-11
lines changed Expand file tree Collapse file tree 6 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import { Switch , Route , Redirect } from " react-router-dom" ;
2
+ import { Switch , Route , Redirect } from ' react-router-dom' ;
3
3
import LinkList from './LinkList' ;
4
4
import CreateLink from './CreateLink' ;
5
5
import Header from './Header' ;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ const POST_MUTATION = gql`
14
14
`
15
15
16
16
const CreateLink = ( { history } ) => {
17
- const [ description , setDescription ] = React . useState ( "" ) ;
17
+ const [ description , setDescription ] = React . useState ( '' ) ;
18
18
const [ url , setUrl ] = React . useState ( '' ) ;
19
19
const [ { fetching } , executeMutation ] = useMutation ( POST_MUTATION ) ;
20
20
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import { Link } from 'react-router-dom' ;
3
3
import { withRouter } from 'react-router' ;
4
- import { getToken , removeToken } from " ../utils" ;
4
+ import { getToken , removeToken } from ' ../utils' ;
5
5
6
6
const Header = ( { history } ) => {
7
7
const authToken = getToken ( ) ;
@@ -35,7 +35,7 @@ const Header = ({ history }) => {
35
35
className = "ml1 pointer black"
36
36
onClick = { ( ) => {
37
37
removeToken ( ) ;
38
- history . push ( `/` ) ;
38
+ history . push ( '/' ) ;
39
39
} }
40
40
>
41
41
logout
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import { useMutation } from 'urql' ;
3
3
import gql from 'graphql-tag' ;
4
- import { timeDifferenceForDate , getToken } from " ../utils" ;
4
+ import { timeDifferenceForDate , getToken } from ' ../utils' ;
5
5
6
6
const VOTE_MUTATION = gql `
7
7
mutation VoteMutation($linkId: ID!) {
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import React, { Fragment } from 'react';
2
2
import { useQuery , useSubscription } from 'urql' ;
3
3
import gql from 'graphql-tag' ;
4
4
import { LINKS_PER_PAGE } from '../constants' ;
5
- import Link from " ./Link" ;
5
+ import Link from ' ./Link' ;
6
6
7
7
export const FEED_QUERY = gql `
8
8
query FeedQuery($first: Int, $skip: Int, $orderBy: LinkOrderByInput) {
@@ -77,14 +77,14 @@ const NEW_VOTES_SUBSCRIPTION = gql`
77
77
` ;
78
78
79
79
const LinkList = ( { location, match, history } ) => {
80
- const isNewPage = location . pathname . includes ( " new" ) ;
80
+ const isNewPage = location . pathname . includes ( ' new' ) ;
81
81
82
82
const variables = React . useMemo ( ( ) => {
83
83
const page = parseInt ( match . params . page , 10 ) ;
84
84
85
85
const skip = isNewPage ? ( page - 1 ) * LINKS_PER_PAGE : 0 ;
86
86
const first = isNewPage ? LINKS_PER_PAGE : 100 ;
87
- const orderBy = isNewPage ? " createdAt_DESC" : null ;
87
+ const orderBy = isNewPage ? ' createdAt_DESC' : null ;
88
88
return { first, skip, orderBy } ;
89
89
} , [ match , isNewPage ] ) ;
90
90
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ const Login = ({ history }) => {
37
37
38
38
return (
39
39
< div >
40
- < h4 className = "mv3" > { login ? " Login" : " Sign Up" } </ h4 >
40
+ < h4 className = "mv3" > { login ? ' Login' : ' Sign Up' } </ h4 >
41
41
< div className = "flex flex-column" >
42
42
{ ! login && (
43
43
< input
@@ -67,14 +67,14 @@ const Login = ({ history }) => {
67
67
onClick = { mutate }
68
68
disabled = { fetching }
69
69
>
70
- { login ? " login" : " create account" }
70
+ { login ? ' login' : ' create account' }
71
71
</ button >
72
72
< button
73
73
type = "button"
74
74
className = "pointer button"
75
75
onClick = { ( ) => setLogin ( ! login ) }
76
76
>
77
- { login ? " need to create an account?" : " already have an account?" }
77
+ { login ? ' need to create an account?' : ' already have an account?' }
78
78
</ button >
79
79
</ div >
80
80
</ div >
You can’t perform that action at this time.
0 commit comments