Skip to content

Commit

Permalink
upadted packages
Browse files Browse the repository at this point in the history
  • Loading branch information
teetangh committed Dec 11, 2024
1 parent 295d4e0 commit 2c26643
Show file tree
Hide file tree
Showing 6 changed files with 802 additions and 1,517 deletions.
2 changes: 1 addition & 1 deletion app/api/payments/stripe/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface UpdatePaymentRequest {

const stripe = process.env.STRIPE_SECRET_KEY
? new Stripe(process.env.STRIPE_SECRET_KEY, {
apiVersion: "2024-10-28.acacia",
apiVersion: "2024-11-20.acacia",
})
: ({
paymentIntents: {
Expand Down
8 changes: 4 additions & 4 deletions app/api/user/consultants/[id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ export async function GET(
{ params }: { params: Promise<{ id: string }> },
) {
try {
const session = await getServerSession(authOptions);
if (!session) {
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
}
// const session = await getServerSession(authOptions);
// if (!session) {
// return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
// }

const { id } = await params;
if (!id) {
Expand Down
2 changes: 1 addition & 1 deletion app/explore/experts/[consultantId]/PricingToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export default function PricingToggle({
);
}
// Restrict access to consultees only using session
if (!session?.user?.role || session.user.role.toLowerCase() !== "consultee") {
if (session?.user?.role && ["consultant", "staff"].includes(session.user.role.toLowerCase())) {
return (
<div className="w-full max-w-4xl mx-auto py-16 px-4 sm:px-6 lg:px-8 bg-gradient-to-br from-gray-900 to-black rounded-3xl shadow-2xl">
<div className="text-center text-gray-300 space-y-3">
Expand Down
6 changes: 5 additions & 1 deletion app/explore/experts/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ function FindExperts() {
) || [];

if (isLoading) {
return <div>Loading experts...</div>;
return (
<div className="flex items-center justify-center min-h-screen">
<div className="animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-gray-900 dark:border-gray-100" />
</div>
);
}

return (
Expand Down
Loading

0 comments on commit 2c26643

Please sign in to comment.