perf: server-fetch data for all pages in /settings/my-account (#20712)
* wip * fix type check * refactor "/settings/my-account/profile" * refactor "settings/my-account/general" * refactor "/settings/my-accouunt/calendars" * refactor "/settings/my-account/appearance" * fix: type-check --------- Co-authored-by: Amit Sharma <[email protected]> Co-authored-by: Amit Sharma <[email protected]>
This commit is contained in:
32 files changed
+721
-524
No files matched your search
@@ -121,6 +121,20 @@ export class MembershipRepository {
|
||||
});
|
||||
}
|
||||
|
||||
static async findFirstAcceptedMembershipByUserId(userId: number) {
|
||||
return await prisma.membership.findFirst({
|
||||
where: {
|
||||
accepted: true,
|
||||
userId,
|
||||
team: {
|
||||
slug: {
|
||||
not: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
static async createMany(data: IMembership[]) {
|
||||
return await prisma.membership.createMany({
|
||||
data: data.map((item) => ({
|
||||
|
||||
Reference in new issue
Block a user