Skip to content

Commit

Permalink
Upgraded NextAuth
Browse files Browse the repository at this point in the history
  • Loading branch information
oxisto committed Dec 23, 2024
1 parent 1cce6ba commit 42be5b8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
7 changes: 4 additions & 3 deletions ui/app/(app)/portfolios/[name]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import client from "@/lib/api";
import Link from "next/link";

export interface PortfolioProps {
params: {
params: Promise<{
name: string;
};
}>;
}

export default async function Portfolio({ params }: PortfolioProps) {
export default async function Portfolio(props: PortfolioProps) {
const params = await props.params;
const { data: portfolio } = await client.GET("/v1/portfolios/{name}", {
params: { path: { name: params.name } },
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ interface PortfolioTransactionProps {
}
interface EditPortfolioTransactionProps extends PortfolioTransactionProps {}

export default async function EditPortfolioTransaction({
params,
}: EditPortfolioTransactionProps) {
export default async function EditPortfolioTransaction(props: EditPortfolioTransactionProps) {
const params = await props.params;
const { data, error } = await client.GET("/v1/securities");
const create = params.transactionName == "new";
if (create && data) {
Expand Down
5 changes: 2 additions & 3 deletions ui/app/(app)/portfolios/[name]/transactions/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import client from "@/lib/api";

interface PortfolioTransactionProps extends PortfolioProps {}

export default async function PortfolioTransactions({
params,
}: PortfolioTransactionProps) {
export default async function PortfolioTransactions(props: PortfolioTransactionProps) {
const params = await props.params;
const { data: portfolio } = await client.GET("/v1/portfolios/{name}", {
params: { path: { name: params.name } },
});
Expand Down
8 changes: 4 additions & 4 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"inter-ui": "^4.0.2",
"negotiator": "^0.6.3",
"next": "^15.1.1-canary.17",
"next-auth": "^5.0.0-beta.20",
"next-auth": "^5.0.0-beta.25",
"next-intl": "^3.17.3",
"openapi-fetch": "^0.13.0",
"tailwindcss": "^3.4.1"
Expand All @@ -42,4 +42,4 @@
"server-only": "^0.0.1",
"typescript": "^5"
}
}
}

0 comments on commit 42be5b8

Please sign in to comment.