Skip to content

Commit 05b02ce

Browse files
committed
Linting issues fixed to stop Linc from crashing
1 parent b8f5ef0 commit 05b02ce

File tree

6 files changed

+12
-43
lines changed

6 files changed

+12
-43
lines changed

src/App.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
import { useState } from "react";
21
import { Home } from "./pages/Home";
32
import { Login } from "./pages/Login";
43
import { BrowserRouter as Router, Switch, Route } from "react-router-dom";
54
import { ApolloProvider } from "@apollo/client";
65
import { client } from "./client";
76

87
function App() {
9-
const [loggedIn, setLoggedIn] = useState(false);
10-
118
return (
129
<ApolloProvider client={client}>
1310
<Router>

src/components/Login/ForgotPasswordView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FC, useEffect, useState } from "react";
1+
import { FC, useEffect } from "react";
22
import { View } from "../../pages/Login";
33
import { Transition } from "@headlessui/react";
44

@@ -45,7 +45,7 @@ export const ForgotPasswordView: FC<LoginViewProps> = ({
4545

4646
<div className="text-right">
4747
<div className="text-sm">
48-
<a
48+
<a // eslint-disable-line
4949
onClick={() => changeView(View.Login)}
5050
className="font-medium text-cyan-600 hover:text-cyan-500 cursor-pointer"
5151
>

src/components/Login/LoginView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const LoginView: FC<LoginViewProps> = ({ changeView }) => {
7171
</div>
7272

7373
<div className="text-sm">
74-
<a
74+
<a // eslint-disable-line
7575
onClick={() => changeView(View.ForgotPassword)}
7676
className="font-medium text-cyan-600 hover:text-cyan-500 cursor-pointer"
7777
>

src/components/Login/RegisterView.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { FC, useState } from "react";
2-
import { Link } from "react-router-dom";
32

43
import { View } from "../../pages/Login";
54

@@ -72,16 +71,17 @@ export const RegisterView: FC<LoginViewProps> = ({ changeView }) => {
7271
</div>
7372
</div>
7473
<div>
75-
<Link to="/">
76-
<button className="transition w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-cyan-600 hover:bg-cyan-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyans-500 disabled:opacity-50">
77-
Sign Up
78-
</button>
79-
</Link>
74+
<button
75+
onClick={() => changeView(View.Login)}
76+
className="transition w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-cyan-600 hover:bg-cyan-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyans-500 disabled:opacity-50"
77+
>
78+
Sign Up
79+
</button>
8080
</div>
8181

8282
<div className="text-right">
8383
<div className="text-sm">
84-
<a
84+
<a // eslint-disable-line
8585
onClick={() => changeView(View.Login)}
8686
className="font-medium text-cyan-600 hover:text-cyan-500 cursor-pointer"
8787
>

src/components/Login/styles.css

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/pages/Login.tsx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
import gql from "graphql-tag";
21
import { FC, useState } from "react";
3-
import { Menu, Transition } from "@headlessui/react";
4-
import classNames from "classnames";
5-
import { Link } from "react-router-dom";
6-
import { useQuery } from "@apollo/client";
7-
import { Search } from "./__generated__/Search";
8-
import { SearchResults } from "../components/SearchResults";
9-
import { CSSTransition } from "react-transition-group";
102
import AnimateHeight from "react-animate-height";
113

124
import { LoginView } from "../components/Login/LoginView";
@@ -25,7 +17,6 @@ export enum View {
2517
export const Login: FC = () => {
2618
const [currentView, setCurrentView] = useState<View>(View.Login);
2719
const [notificationShowing, setNotificationShowing] = useState(false);
28-
const [searchTerm, setSearchTerm] = useState("");
2920

3021
return (
3122
<div>
@@ -50,10 +41,9 @@ export const Login: FC = () => {
5041
{currentView === View.Login && (
5142
<p className="mt-2 text-center text-sm text-gray-600 max-w">
5243
Or&nbsp;
53-
<a
44+
<a // eslint-disable-line
5445
onClick={() => setCurrentView(View.Register)}
55-
href="#"
56-
className="transition font-medium text-cyan-600 hover:text-cyan-500"
46+
className="cursor-pointer transition font-medium text-cyan-600 hover:text-cyan-500"
5747
>
5848
register here...
5949
</a>

0 commit comments

Comments
 (0)