mirror of
https://github.com/wireadmin/wireadmin
synced 2025-01-23 12:27:00 +00:00
fix
This commit is contained in:
parent
3f9c4ea36c
commit
b0663a7e15
@ -13,7 +13,6 @@ export default withAuth({
|
|||||||
// See "Matching Paths" below to learn more
|
// See "Matching Paths" below to learn more
|
||||||
export const config = {
|
export const config = {
|
||||||
matcher: [
|
matcher: [
|
||||||
// Match all request paths except for the `/api/auth/*` paths
|
'/((?!api/auth|login|logo.png|fonts|_next/static|_next/image|favicon.ico).*)'
|
||||||
'/((?!api/auth|login|fonts|_next/static|_next/image|favicon.ico).*)',
|
|
||||||
],
|
],
|
||||||
}
|
}
|
@ -9,7 +9,10 @@ function publicENV(ex = {}) {
|
|||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
transpilePackages: [],
|
transpilePackages: [],
|
||||||
env: publicENV({ NEXTAUTH_URL: 'http://localhost:3000' })
|
env: publicENV({ NEXTAUTH_URL: 'http://127.0.0.1:3000' }),
|
||||||
|
images: {
|
||||||
|
domains: [ 'img.shields.io' ]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = nextConfig;
|
module.exports = nextConfig;
|
||||||
|
@ -3,9 +3,11 @@ import PageFooter from "@ui/pages/PageFooter";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import { Button, Form, Input } from "antd";
|
import { Button, Form, Input } from "antd";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
export default function LoginPage() {
|
export default function LoginPage() {
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
const [ form ] = Form.useForm()
|
const [ form ] = Form.useForm()
|
||||||
|
|
||||||
async function handleFinish({ password }: { password: string | undefined }) {
|
async function handleFinish({ password }: { password: string | undefined }) {
|
||||||
@ -15,9 +17,11 @@ export default function LoginPage() {
|
|||||||
|
|
||||||
await signIn(
|
await signIn(
|
||||||
'credentials',
|
'credentials',
|
||||||
{ callbackUrl: '/' },
|
{ redirect: false },
|
||||||
{ password }
|
{ password }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
await router.push('/')
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user