Fix linting issues

This commit is contained in:
Max Leiter 2022-11-28 18:36:11 -08:00
parent d6894ffb8b
commit 8048e99794
3 changed files with 9 additions and 6 deletions

View file

@ -61,6 +61,7 @@ const Auth = ({
placeholder="Server Password"
required
width="100%"
aria-label="Server Password"
/>
)}
<Button

View file

@ -66,12 +66,12 @@ const UserTable = ({ users: initial }: { users: UserWithPosts[] }) => {
if (res.status === 200) {
setToast({
text: "User deleted",
message: "User deleted",
type: "success"
})
} else {
setToast({
text: "Something went wrong",
message: "Something went wrong",
type: "error"
})
}

View file

@ -3,7 +3,7 @@
import Button from "@components/button"
import Input from "@components/input"
import Note from "@components/note"
import { useToasts } from "@geist-ui/core/dist"
import { useToasts } from "@components/toasts"
import { User } from "next-auth"
import { useState } from "react"
@ -26,7 +26,7 @@ const Profile = ({ user }: { user: User }) => {
e.preventDefault()
if (!name && !bio) {
setToast({
text: "Please fill out at least one field",
message: "Please fill out at least one field",
type: "error"
})
return
@ -47,12 +47,12 @@ const Profile = ({ user }: { user: User }) => {
if (res.status === 200) {
setToast({
text: "Profile updated",
message: "Profile updated",
type: "success"
})
} else {
setToast({
text: "Something went wrong updating your profile",
message: "Something went wrong updating your profile",
type: "error"
})
}
@ -80,6 +80,7 @@ const Profile = ({ user }: { user: User }) => {
placeholder="my name"
value={name || ""}
onChange={handleNameChange}
aria-label="Display name"
/>
</div>
<div>
@ -91,6 +92,7 @@ const Profile = ({ user }: { user: User }) => {
placeholder="my@email.io"
value={user.email || undefined}
disabled
aria-label="Email"
/>
</div>
{/* <div>