Skip to content

Commit

Permalink
Lint fix import order and formatting of dbAuth templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Philzen committed Aug 8, 2022
1 parent ed5ccaa commit ff02b0d
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { useEffect, useRef } from 'react'

import { useAuth } from '@redwoodjs/auth'
import { Form, Label, TextField, Submit, FieldError } from '@redwoodjs/forms'
import { navigate, routes } from '@redwoodjs/router'
import { MetaTags } from '@redwoodjs/web'
import { toast, Toaster } from '@redwoodjs/web/toast'
import { Form, Label, TextField, Submit, FieldError } from '@redwoodjs/forms'

const ForgotPasswordPage = () => {
const { isAuthenticated, forgotPassword } = useAuth()
Expand All @@ -28,7 +29,9 @@ const ForgotPasswordPage = () => {
// The function `forgotPassword.handler` in api/src/functions/auth.js has
// been invoked, let the user know how to get the link to reset their
// password (sent in email, perhaps?)
toast.success('A link to reset your password was sent to ' + response.email)
toast.success(
'A link to reset your password was sent to ' + response.email
)
navigate(routes.login())
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Link, navigate, routes } from '@redwoodjs/router'
import { useRef } from 'react'
import { useEffect } from 'react'

import { useAuth } from '@redwoodjs/auth'
import {
Form,
Label,
Expand All @@ -8,10 +10,9 @@ import {
Submit,
FieldError,
} from '@redwoodjs/forms'
import { useAuth } from '@redwoodjs/auth'
import { Link, navigate, routes } from '@redwoodjs/router'
import { MetaTags } from '@redwoodjs/web'
import { toast, Toaster } from '@redwoodjs/web/toast'
import { useEffect } from 'react'

const LoginPage = () => {
const { isAuthenticated, logIn } = useAuth()
Expand Down Expand Up @@ -97,7 +98,10 @@ const LoginPage = () => {
/>

<div className="rw-forgot-link">
<Link to={routes.forgotPassword()} className="rw-forgot-link">
<Link
to={routes.forgotPassword()}
className="rw-forgot-link"
>
Forgot Password?
</Link>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Link, navigate, routes } from '@redwoodjs/router'
import { useRef, useState } from 'react'
import { useEffect } from 'react'

import { useAuth } from '@redwoodjs/auth'
import {
Form,
Expand All @@ -9,9 +10,9 @@ import {
Submit,
FieldError,
} from '@redwoodjs/forms'
import { Link, navigate, routes } from '@redwoodjs/router'
import { MetaTags } from '@redwoodjs/web'
import { toast, Toaster } from '@redwoodjs/web/toast'
import { useEffect } from 'react'

const WELCOME_MESSAGE = 'Welcome back!'
const REDIRECT = routes.home()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import { useEffect, useRef, useState } from 'react'

import { useAuth } from '@redwoodjs/auth'
import { navigate, routes } from '@redwoodjs/router'
import { MetaTags } from '@redwoodjs/web'
import { toast, Toaster } from '@redwoodjs/web/toast'
import {
Form,
Label,
PasswordField,
Submit,
FieldError,
} from '@redwoodjs/forms'
import { navigate, routes } from '@redwoodjs/router'
import { MetaTags } from '@redwoodjs/web'
import { toast, Toaster } from '@redwoodjs/web/toast'

const ResetPasswordPage = ({ resetToken }) => {
const { isAuthenticated, reauthenticate, validateResetToken, resetPassword } = useAuth()
const { isAuthenticated, reauthenticate, validateResetToken, resetPassword } =
useAuth()
const [enabled, setEnabled] = useState(true)

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Link, navigate, routes } from '@redwoodjs/router'
import { useRef } from 'react'
import { useEffect } from 'react'

import { useAuth } from '@redwoodjs/auth'
import {
Form,
Label,
Expand All @@ -8,10 +10,9 @@ import {
FieldError,
Submit,
} from '@redwoodjs/forms'
import { useAuth } from '@redwoodjs/auth'
import { Link, navigate, routes } from '@redwoodjs/router'
import { MetaTags } from '@redwoodjs/web'
import { toast, Toaster } from '@redwoodjs/web/toast'
import { useEffect } from 'react'

const SignupPage = () => {
const { isAuthenticated, signUp } = useAuth()
Expand Down Expand Up @@ -99,7 +100,9 @@ const SignupPage = () => {
<FieldError name="password" className="rw-field-error" />

<div className="rw-button-group">
<Submit className="rw-button rw-button-blue">Sign Up</Submit>
<Submit className="rw-button rw-button-blue">
Sign Up
</Submit>
</div>
</Form>
</div>
Expand Down

0 comments on commit ff02b0d

Please sign in to comment.