Fix linting issues
This commit is contained in:
parent
d6894ffb8b
commit
8048e99794
3 changed files with 9 additions and 6 deletions
|
@ -61,6 +61,7 @@ const Auth = ({
|
||||||
placeholder="Server Password"
|
placeholder="Server Password"
|
||||||
required
|
required
|
||||||
width="100%"
|
width="100%"
|
||||||
|
aria-label="Server Password"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -66,12 +66,12 @@ const UserTable = ({ users: initial }: { users: UserWithPosts[] }) => {
|
||||||
|
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
setToast({
|
setToast({
|
||||||
text: "User deleted",
|
message: "User deleted",
|
||||||
type: "success"
|
type: "success"
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
setToast({
|
setToast({
|
||||||
text: "Something went wrong",
|
message: "Something went wrong",
|
||||||
type: "error"
|
type: "error"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import Button from "@components/button"
|
import Button from "@components/button"
|
||||||
import Input from "@components/input"
|
import Input from "@components/input"
|
||||||
import Note from "@components/note"
|
import Note from "@components/note"
|
||||||
import { useToasts } from "@geist-ui/core/dist"
|
import { useToasts } from "@components/toasts"
|
||||||
import { User } from "next-auth"
|
import { User } from "next-auth"
|
||||||
import { useState } from "react"
|
import { useState } from "react"
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ const Profile = ({ user }: { user: User }) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
if (!name && !bio) {
|
if (!name && !bio) {
|
||||||
setToast({
|
setToast({
|
||||||
text: "Please fill out at least one field",
|
message: "Please fill out at least one field",
|
||||||
type: "error"
|
type: "error"
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
@ -47,12 +47,12 @@ const Profile = ({ user }: { user: User }) => {
|
||||||
|
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
setToast({
|
setToast({
|
||||||
text: "Profile updated",
|
message: "Profile updated",
|
||||||
type: "success"
|
type: "success"
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
setToast({
|
setToast({
|
||||||
text: "Something went wrong updating your profile",
|
message: "Something went wrong updating your profile",
|
||||||
type: "error"
|
type: "error"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -80,6 +80,7 @@ const Profile = ({ user }: { user: User }) => {
|
||||||
placeholder="my name"
|
placeholder="my name"
|
||||||
value={name || ""}
|
value={name || ""}
|
||||||
onChange={handleNameChange}
|
onChange={handleNameChange}
|
||||||
|
aria-label="Display name"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -91,6 +92,7 @@ const Profile = ({ user }: { user: User }) => {
|
||||||
placeholder="my@email.io"
|
placeholder="my@email.io"
|
||||||
value={user.email || undefined}
|
value={user.email || undefined}
|
||||||
disabled
|
disabled
|
||||||
|
aria-label="Email"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{/* <div>
|
{/* <div>
|
||||||
|
|
Loading…
Reference in a new issue