Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update auth pages ui @Isaac-Tait #257

Merged
merged 3 commits into from
Jul 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions web/src/pages/ForgotPasswordPage/ForgotPasswordPage.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { useEffect, useRef } from 'react'

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

import Button from 'src/components/Button'

const ForgotPasswordPage = () => {
const { forgotPassword } = useAuth()

Expand Down Expand Up @@ -68,9 +70,7 @@ const ForgotPasswordPage = () => {
<FieldError name="username" className="rw-field-error" />
</div>

<div className="rw-button-group">
<Submit className="rw-button rw-button-blue">Submit</Submit>
</div>
<Button>Submit</Button>
</Form>
</div>
</div>
Expand Down
10 changes: 4 additions & 6 deletions web/src/pages/LoginPage/LoginPage.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { useRef } from 'react'
import { useEffect } from 'react'
import { useRef, useEffect } from 'react'

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

import Button from 'src/components/Button'

const LoginPage = () => {
const { logIn } = useAuth()

Expand Down Expand Up @@ -102,9 +102,7 @@ const LoginPage = () => {

<FieldError name="password" className="rw-field-error" />

<div className="rw-button-group">
<Submit className="rw-button rw-button-blue">Login</Submit>
</div>
<Button>Login</Button>
</Form>
</div>
</div>
Expand Down
12 changes: 3 additions & 9 deletions web/src/pages/ResetPasswordPage/ResetPasswordPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ 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'

import Button from 'src/components/Button'

const ResetPasswordPage = ({ resetToken }) => {
const { reauthenticate, validateResetToken, resetPassword } = useAuth()
const [enabled, setEnabled] = useState(true)
Expand Down Expand Up @@ -92,14 +93,7 @@ const ResetPasswordPage = ({ resetToken }) => {
<FieldError name="password" className="rw-field-error" />
</div>

<div className="rw-button-group">
<Submit
className="rw-button rw-button-blue"
disabled={!enabled}
>
Submit
</Submit>
</div>
<Button disabled={!enabled}>Submit</Button>
</Form>
</div>
</div>
Expand Down
14 changes: 5 additions & 9 deletions web/src/pages/SignupPage/SignupPage.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { useRef } from 'react'
import { useEffect } from 'react'
import { useRef, useEffect } from 'react'

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

import Button from 'src/components/Button'

const SignupPage = () => {
const { signUp } = useAuth()

Expand Down Expand Up @@ -95,11 +95,7 @@ const SignupPage = () => {

<FieldError name="password" className="rw-field-error" />

<div className="rw-button-group">
<Submit className="rw-button rw-button-blue">
Sign Up
</Submit>
</div>
<Button>Sign Up</Button>
</Form>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions web/src/scaffold.css
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@
.rw-input {
display: block;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
width: 100%;
padding: 0.5rem;
border-width: 1px;
Expand Down