mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-23 00:51:36 +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'
|
||||
|
||||
const LoginPage = (props) => {
|
||||
const LoginPage = () => {
|
||||
return (
|
||||
<>
|
||||
<LoginForm/>
|
||||
|
@ -1,6 +1,4 @@
|
||||
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 { useQuery } from '@wasp/queries'
|
||||
@ -9,7 +7,7 @@ import createTask from '@wasp/actions/createTask'
|
||||
import updateTask from '@wasp/actions/updateTask'
|
||||
import Clocks from './Clocks'
|
||||
|
||||
const MainPage = ({ user }) => {
|
||||
const MainPage = () => {
|
||||
const { data: tasks, isFetching, error } = useQuery(getTasks)
|
||||
|
||||
return (
|
||||
@ -57,7 +55,7 @@ const TasksList = (props) => {
|
||||
return props.tasks.map((task, idx) => <Task task={task} key={idx} />)
|
||||
}
|
||||
|
||||
const NewTaskForm = (props) => {
|
||||
const NewTaskForm = () => {
|
||||
const handleSubmit = async (event) => {
|
||||
event.preventDefault()
|
||||
try {
|
||||
|
@ -3,7 +3,7 @@ import { Link } from 'react-router-dom'
|
||||
|
||||
import SignupForm from '@wasp/auth/forms/Signup'
|
||||
|
||||
const SignupPage = (props) => {
|
||||
const SignupPage = () => {
|
||||
return (
|
||||
<>
|
||||
<SignupForm/>
|
||||
|
@ -7,7 +7,6 @@ import Paper from '@material-ui/core/Paper'
|
||||
import Table from '@material-ui/core/Table'
|
||||
import TableBody from '@material-ui/core/TableBody'
|
||||
import TableCell from '@material-ui/core/TableCell'
|
||||
import TableHead from '@material-ui/core/TableHead'
|
||||
import TableRow from '@material-ui/core/TableRow'
|
||||
import Checkbox from '@material-ui/core/Checkbox'
|
||||
|
||||
@ -156,7 +155,7 @@ const NewTaskForm = (props) => {
|
||||
value={description}
|
||||
onChange={e => setDescription(e.target.value)}
|
||||
/>
|
||||
<Button
|
||||
<Button
|
||||
variant="contained" color="primary" type='submit'
|
||||
>
|
||||
Create new task
|
||||
|
@ -2,7 +2,7 @@ import React from 'react'
|
||||
|
||||
import { Link } from 'react-router-dom'
|
||||
|
||||
export default () => {
|
||||
const About = () => {
|
||||
return (
|
||||
<>
|
||||
<div>I am About page!</div>
|
||||
@ -10,3 +10,5 @@ export default () => {
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default About;
|
||||
|
@ -1,13 +1,11 @@
|
||||
import React from 'react'
|
||||
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 Todo from '../Todo.js'
|
||||
import '../Main.css'
|
||||
|
||||
const Main = ({ user }) => {
|
||||
const Main = () => {
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
|
@ -1,9 +1,9 @@
|
||||
import React, { useState } from 'react'
|
||||
import React from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
||||
import LoginForm from '@wasp/auth/forms/Login'
|
||||
|
||||
const Login = (props) => {
|
||||
const Login = () => {
|
||||
return (
|
||||
<>
|
||||
<LoginForm/>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useState } from 'react'
|
||||
import React from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
||||
import SignupForm from '@wasp/auth/forms/Signup'
|
||||
@ -6,8 +6,8 @@ import getNumTasks from '@wasp/queries/getNumTasks'
|
||||
import { useQuery } from '@wasp/queries'
|
||||
|
||||
|
||||
const Signup = (props) => {
|
||||
const { data: numTasks, isError, error: tasksError } = useQuery(getNumTasks)
|
||||
const Signup = () => {
|
||||
const { data: numTasks } = useQuery(getNumTasks)
|
||||
return (
|
||||
<>
|
||||
<SignupForm/>
|
||||
|
@ -89,7 +89,7 @@ import { Link } from 'react-router-dom'
|
||||
|
||||
import LoginForm from '@wasp/auth/forms/Login'
|
||||
|
||||
const LoginPage = (props) => {
|
||||
const LoginPage = () => {
|
||||
return (
|
||||
<>
|
||||
<LoginForm/>
|
||||
@ -112,7 +112,7 @@ import { Link } from 'react-router-dom'
|
||||
|
||||
import SignupForm from '@wasp/auth/forms/Signup'
|
||||
|
||||
const SignupPage = (props) => {
|
||||
const SignupPage = () => {
|
||||
return (
|
||||
<>
|
||||
<SignupForm/>
|
||||
|
Loading…
Reference in New Issue
Block a user