Skip to content

Commit

Permalink
Fix more type errors and add typescript command (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
slye-stripe authored Jun 6, 2024
1 parent e21b188 commit 3974b81
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/(auth)/onboarding/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {ConnectAccountOnboarding} from '@stripe/react-connect-js';
import EmbeddedComponentContainer from '@/app/components/EmbeddedComponentContainer';
import React from 'react';
import {useSession} from 'next-auth/react';
import {type NextRequest} from 'next/server';

export default function Onboarding() {
const {data: session, status} = useSession();
Expand Down
5 changes: 5 additions & 0 deletions app/api/setup_accounts/create_bank_account/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ import Salon from '@/app/models/salon';
import {authOptions} from '@/lib/auth';
import {stripe} from '@/lib/stripe';
import {getServerSession} from 'next-auth';
import {type NextRequest} from 'next/server';

export async function POST(req: NextRequest) {
try {
const session = await getServerSession(authOptions);
const accountId = session?.user.stripeAccount.id;
const json = await req.json();

if (!accountId) {
throw new Error('Stripe account ID is undefined');
}

const {
country,
currency,
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"start": "next start",
"lint": "next lint && npm run prettier-check",
"prettier": "prettier './**/*.{js,ts,md,html,css,tsx}' --write",
"prettier-check": "prettier './**/*.{js,ts,md,html,tsx}' --check"
"prettier-check": "prettier './**/*.{js,ts,md,html,tsx}' --check",
"typescript": "tsc -p ."
},
"dependencies": {
"@emotion/react": "^11.11.4",
Expand Down Expand Up @@ -62,6 +63,6 @@
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.13",
"tailwindcss": "^3.3.0",
"typescript": "^5.3"
"typescript": "5.4.3"
}
}

0 comments on commit 3974b81

Please sign in to comment.