fix admin 404
This commit is contained in:
parent
f81999241f
commit
2b36e3c58e
1 changed files with 5 additions and 5 deletions
|
@ -1,11 +1,11 @@
|
||||||
import { getAllPosts, getAllUsers } from "@lib/server/prisma"
|
import { getAllPosts, getAllUsers } from "@lib/server/prisma"
|
||||||
import { getCurrentUser } from "@lib/server/session"
|
import { getCurrentUser } from "@lib/server/session"
|
||||||
import { notFound } from "next/navigation"
|
import { notFound } from "next/navigation"
|
||||||
import styles from "./admin.module.css"
|
import styles from "./components/admin.module.css"
|
||||||
import PostTable from "./post-table"
|
import PostTable from "./components/post-table"
|
||||||
import UserTable from "./user-table"
|
import UserTable from "./components/user-table"
|
||||||
|
|
||||||
const Admin = async () => {
|
const AdminPage = async () => {
|
||||||
const user = await getCurrentUser()
|
const user = await getCurrentUser()
|
||||||
if (!user) {
|
if (!user) {
|
||||||
return notFound()
|
return notFound()
|
||||||
|
@ -36,4 +36,4 @@ const Admin = async () => {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Admin
|
export default AdminPage
|
Loading…
Reference in a new issue