Skip to content

Commit

Permalink
Apply same fixes to deposit history page
Browse files Browse the repository at this point in the history
  • Loading branch information
ccruzkauppila committed Jan 6, 2025
1 parent 0cdb465 commit 8f28624
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/app/(loggedin)/account/deposits/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ import { formatCleverDate, parseISOString } from "@/common/utils";
import { EmptyPage } from "@/components/ui/EmptyPage";
import { HistoryList, HistoryListItem } from "@/components/ui/HistoryList";
import { AccountHistoryLayout } from "@/components/ui/Layouts/AccountHistoryLayout";
import { getCurrentUser } from "@/server/db/queries/account";
import { getDepositHistory } from "@/server/db/queries/deposit";
import { InternalServerError } from "@/server/exceptions/exception";

export const dynamic = "force-dynamic";

const DepositHistoryPage = async () => {
const session = await getSession();
if (!session) {
const user = await getCurrentUser();
if (!user.ok) {
redirect("/login");
}
const userId = session.user.userId;
const userId = user.user.id;
const depositHistoryQuery = await getDepositHistory(userId);
if (!depositHistoryQuery.ok) {
throw new InternalServerError({
Expand Down

0 comments on commit 8f28624

Please sign in to comment.