add route for pinned links + better dashboard UX

This commit is contained in:
daniel31x13
2023-11-11 14:57:46 -05:00
parent 49b1ea4875
commit b19d6694ec
8 changed files with 186 additions and 124 deletions
@@ -14,9 +14,7 @@ export default async function getDashboardData(
else if (query.sort === Sort.DescriptionZA) order = { description: "desc" };
const pinnedLinks = await prisma.link.findMany({
take: Number(process.env.PAGINATION_TAKE_COUNT) || 20,
skip: query.cursor ? 1 : undefined,
cursor: query.cursor ? { id: query.cursor } : undefined,
take: 6,
where: {
AND: [
{