Skip to content

Commit

Permalink
Order websites list by creation date
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonioVdlC committed Feb 16, 2022
1 parent b870b58 commit 89d8f20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/routes/app/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const loader: LoaderFunction = async ({ request }) => {
const user = await requireCurrentUser(request);
const websites = await db.website.findMany({
where: { orgId: user.currentOrg.id, isActive: true },
orderBy: { createdAt: "asc" },
});

if (!websites.length) {
Expand Down
1 change: 1 addition & 0 deletions app/routes/app/websites.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const loader: LoaderFunction = async ({ request }) => {

const websites = await db.website.findMany({
where: { orgId: user.currentOrg.id, isActive: true },
orderBy: { createdAt: "asc" },
});

return {
Expand Down

0 comments on commit 89d8f20

Please sign in to comment.