Skip to content

Commit d2a3ac8

Browse files
committed
(chore) - use single quotes consistently
1 parent 9d52b6d commit d2a3ac8

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

src/components/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Switch, Route, Redirect } from "react-router-dom";
2+
import { Switch, Route, Redirect } from 'react-router-dom';
33
import LinkList from './LinkList';
44
import CreateLink from './CreateLink';
55
import Header from './Header';

src/components/CreateLink.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const POST_MUTATION = gql`
1414
`
1515

1616
const CreateLink = ({ history }) => {
17-
const [description, setDescription] = React.useState("");
17+
const [description, setDescription] = React.useState('');
1818
const [url, setUrl] = React.useState('');
1919
const [{ fetching }, executeMutation] = useMutation(POST_MUTATION);
2020

src/components/Header.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { Link } from 'react-router-dom';
33
import { withRouter } from 'react-router';
4-
import { getToken, removeToken } from "../utils";
4+
import { getToken, removeToken } from '../utils';
55

66
const Header = ({ history }) => {
77
const authToken = getToken();
@@ -35,7 +35,7 @@ const Header = ({ history }) => {
3535
className="ml1 pointer black"
3636
onClick={() => {
3737
removeToken();
38-
history.push(`/`);
38+
history.push('/');
3939
}}
4040
>
4141
logout

src/components/Link.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { useMutation } from 'urql';
33
import gql from 'graphql-tag';
4-
import { timeDifferenceForDate, getToken } from "../utils";
4+
import { timeDifferenceForDate, getToken } from '../utils';
55

66
const VOTE_MUTATION = gql`
77
mutation VoteMutation($linkId: ID!) {

src/components/LinkList.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { Fragment } from 'react';
22
import { useQuery, useSubscription } from 'urql';
33
import gql from 'graphql-tag';
44
import { LINKS_PER_PAGE } from '../constants';
5-
import Link from "./Link";
5+
import Link from './Link';
66

77
export const FEED_QUERY = gql`
88
query FeedQuery($first: Int, $skip: Int, $orderBy: LinkOrderByInput) {
@@ -77,14 +77,14 @@ const NEW_VOTES_SUBSCRIPTION = gql`
7777
`;
7878

7979
const LinkList = ({ location, match, history }) => {
80-
const isNewPage = location.pathname.includes("new");
80+
const isNewPage = location.pathname.includes('new');
8181

8282
const variables = React.useMemo(() => {
8383
const page = parseInt(match.params.page, 10);
8484

8585
const skip = isNewPage ? (page - 1) * LINKS_PER_PAGE : 0;
8686
const first = isNewPage ? LINKS_PER_PAGE : 100;
87-
const orderBy = isNewPage ? "createdAt_DESC" : null;
87+
const orderBy = isNewPage ? 'createdAt_DESC' : null;
8888
return { first, skip, orderBy };
8989
}, [match, isNewPage]);
9090

src/components/Login.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const Login = ({ history }) => {
3737

3838
return (
3939
<div>
40-
<h4 className="mv3">{login ? "Login" : "Sign Up"}</h4>
40+
<h4 className="mv3">{login ? 'Login' : 'Sign Up'}</h4>
4141
<div className="flex flex-column">
4242
{!login && (
4343
<input
@@ -67,14 +67,14 @@ const Login = ({ history }) => {
6767
onClick={mutate}
6868
disabled={fetching}
6969
>
70-
{login ? "login" : "create account"}
70+
{login ? 'login' : 'create account'}
7171
</button>
7272
<button
7373
type="button"
7474
className="pointer button"
7575
onClick={() => setLogin(!login)}
7676
>
77-
{login ? "need to create an account?" : "already have an account?"}
77+
{login ? 'need to create an account?' : 'already have an account?'}
7878
</button>
7979
</div>
8080
</div>

0 commit comments

Comments
 (0)