mirror of
https://github.com/traberph/short.git
synced 2026-11-22 22:55:12 +00:00
add functionality to pin page && refactoring
This commit is contained in:
@@ -9,16 +9,17 @@ export default async function Dashboard() {
|
||||
|
||||
const pages = await prisma.page.findMany({
|
||||
include: {
|
||||
RedirectPage: true,
|
||||
CustomPage: true,
|
||||
pinnedPage: true,
|
||||
redirectPage: true,
|
||||
customPage: true,
|
||||
_count: {
|
||||
select: { Stat: true }
|
||||
select: { stat: true }
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const redirectPages = pages.filter((page) => page.RedirectPage.length > 0);
|
||||
const customPages = pages.filter((page) => page.CustomPage.length > 0);
|
||||
const redirectPages = pages.filter((page) => page.redirectPage.length > 0);
|
||||
const customPages = pages.filter((page) => page.customPage.length > 0);
|
||||
|
||||
return (<>
|
||||
<h2>Redirect Pages</h2>
|
||||
|
||||
Reference in New Issue
Block a user