mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-23 09:02:26 +03:00
Fixed lint errors in Todo Tutorial (#349)
* Fixed lint errors in waspc Todo example Signed-off-by: Vini Andrade <vini.andrade.dev@gmail.com> * Fixed lint errors in example TodoApp Signed-off-by: Vini Andrade <vini.andrade.dev@gmail.com> * Fixed lint errors in todo app docs Signed-off-by: Vini Andrade <vini.andrade.dev@gmail.com>
This commit is contained in:
parent
422c354abc
commit
dfd6773cc1
@ -3,7 +3,7 @@ import { Link } from 'react-router-dom'
|
|||||||
|
|
||||||
import LoginForm from '@wasp/auth/forms/Login'
|
import LoginForm from '@wasp/auth/forms/Login'
|
||||||
|
|
||||||
const LoginPage = (props) => {
|
const LoginPage = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LoginForm/>
|
<LoginForm/>
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { Link } from 'react-router-dom'
|
|
||||||
import useAuth from '@wasp/auth/useAuth.js'
|
|
||||||
|
|
||||||
import logout from '@wasp/auth/logout.js'
|
import logout from '@wasp/auth/logout.js'
|
||||||
import { useQuery } from '@wasp/queries'
|
import { useQuery } from '@wasp/queries'
|
||||||
@ -9,7 +7,7 @@ import createTask from '@wasp/actions/createTask'
|
|||||||
import updateTask from '@wasp/actions/updateTask'
|
import updateTask from '@wasp/actions/updateTask'
|
||||||
import Clocks from './Clocks'
|
import Clocks from './Clocks'
|
||||||
|
|
||||||
const MainPage = ({ user }) => {
|
const MainPage = () => {
|
||||||
const { data: tasks, isFetching, error } = useQuery(getTasks)
|
const { data: tasks, isFetching, error } = useQuery(getTasks)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -57,7 +55,7 @@ const TasksList = (props) => {
|
|||||||
return props.tasks.map((task, idx) => <Task task={task} key={idx} />)
|
return props.tasks.map((task, idx) => <Task task={task} key={idx} />)
|
||||||
}
|
}
|
||||||
|
|
||||||
const NewTaskForm = (props) => {
|
const NewTaskForm = () => {
|
||||||
const handleSubmit = async (event) => {
|
const handleSubmit = async (event) => {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
try {
|
try {
|
||||||
|
@ -3,7 +3,7 @@ import { Link } from 'react-router-dom'
|
|||||||
|
|
||||||
import SignupForm from '@wasp/auth/forms/Signup'
|
import SignupForm from '@wasp/auth/forms/Signup'
|
||||||
|
|
||||||
const SignupPage = (props) => {
|
const SignupPage = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<SignupForm/>
|
<SignupForm/>
|
||||||
|
@ -7,7 +7,6 @@ import Paper from '@material-ui/core/Paper'
|
|||||||
import Table from '@material-ui/core/Table'
|
import Table from '@material-ui/core/Table'
|
||||||
import TableBody from '@material-ui/core/TableBody'
|
import TableBody from '@material-ui/core/TableBody'
|
||||||
import TableCell from '@material-ui/core/TableCell'
|
import TableCell from '@material-ui/core/TableCell'
|
||||||
import TableHead from '@material-ui/core/TableHead'
|
|
||||||
import TableRow from '@material-ui/core/TableRow'
|
import TableRow from '@material-ui/core/TableRow'
|
||||||
import Checkbox from '@material-ui/core/Checkbox'
|
import Checkbox from '@material-ui/core/Checkbox'
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import React from 'react'
|
|||||||
|
|
||||||
import { Link } from 'react-router-dom'
|
import { Link } from 'react-router-dom'
|
||||||
|
|
||||||
export default () => {
|
const About = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div>I am About page!</div>
|
<div>I am About page!</div>
|
||||||
@ -10,3 +10,5 @@ export default () => {
|
|||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default About;
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import Button from '@material-ui/core/Button'
|
import Button from '@material-ui/core/Button'
|
||||||
|
|
||||||
import { Link } from 'react-router-dom'
|
|
||||||
import useAuth from '@wasp/auth/useAuth.js'
|
|
||||||
import logout from '@wasp/auth/logout.js'
|
import logout from '@wasp/auth/logout.js'
|
||||||
import Todo from '../Todo.js'
|
import Todo from '../Todo.js'
|
||||||
import '../Main.css'
|
import '../Main.css'
|
||||||
|
|
||||||
const Main = ({ user }) => {
|
const Main = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Button
|
<Button
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import React, { useState } from 'react'
|
import React from 'react'
|
||||||
import { Link } from 'react-router-dom'
|
import { Link } from 'react-router-dom'
|
||||||
|
|
||||||
import LoginForm from '@wasp/auth/forms/Login'
|
import LoginForm from '@wasp/auth/forms/Login'
|
||||||
|
|
||||||
const Login = (props) => {
|
const Login = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LoginForm/>
|
<LoginForm/>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import React, { useState } from 'react'
|
import React from 'react'
|
||||||
import { Link } from 'react-router-dom'
|
import { Link } from 'react-router-dom'
|
||||||
|
|
||||||
import SignupForm from '@wasp/auth/forms/Signup'
|
import SignupForm from '@wasp/auth/forms/Signup'
|
||||||
@ -6,8 +6,8 @@ import getNumTasks from '@wasp/queries/getNumTasks'
|
|||||||
import { useQuery } from '@wasp/queries'
|
import { useQuery } from '@wasp/queries'
|
||||||
|
|
||||||
|
|
||||||
const Signup = (props) => {
|
const Signup = () => {
|
||||||
const { data: numTasks, isError, error: tasksError } = useQuery(getNumTasks)
|
const { data: numTasks } = useQuery(getNumTasks)
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<SignupForm/>
|
<SignupForm/>
|
||||||
|
@ -89,7 +89,7 @@ import { Link } from 'react-router-dom'
|
|||||||
|
|
||||||
import LoginForm from '@wasp/auth/forms/Login'
|
import LoginForm from '@wasp/auth/forms/Login'
|
||||||
|
|
||||||
const LoginPage = (props) => {
|
const LoginPage = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LoginForm/>
|
<LoginForm/>
|
||||||
@ -112,7 +112,7 @@ import { Link } from 'react-router-dom'
|
|||||||
|
|
||||||
import SignupForm from '@wasp/auth/forms/Signup'
|
import SignupForm from '@wasp/auth/forms/Signup'
|
||||||
|
|
||||||
const SignupPage = (props) => {
|
const SignupPage = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<SignupForm/>
|
<SignupForm/>
|
||||||
|
Loading…
Reference in New Issue
Block a user