sort by title and scroll landing
This commit is contained in:
1 parent
c4cc12850d
commit
1ee8dbc749
2 files changed
+6
-3
No files matched your search
+4
-3
@@ -21,11 +21,12 @@ export default function createPg(log: Log, prisma: PrismaClient) {
|
||||
}
|
||||
|
||||
async function userWants(user: User) {
|
||||
return prisma.want.findMany({
|
||||
const wants = await prisma.want.findMany({
|
||||
where: { userId: user.id },
|
||||
include: { _count: { select: { offers: true }} },
|
||||
orderBy: { offers: { _count: 'desc' } }
|
||||
});
|
||||
})
|
||||
|
||||
return _.sortBy(wants, w => `${w.data.artists_sort} - ${w.data.title}`);
|
||||
}
|
||||
|
||||
async function userOffers(user: User) {
|
||||
|
||||
@@ -22,6 +22,8 @@ body {
|
||||
.landing {
|
||||
display: grid;
|
||||
|
||||
overflow: scroll;
|
||||
|
||||
grid-template-columns: 1fr 2fr;
|
||||
grid-gap: calc(var(--spacing-double) * 2);
|
||||
grid-template-areas:
|
||||
|
||||
Reference in new issue
Block a user