Skip to content

Commit 8e7372a

Browse files
committed
ts
1 parent a6f3843 commit 8e7372a

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

apps/web/app/(org)/onboarding/components/OrganizationSetupPage.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
"use client";
22

3+
import type { users } from "@cap/database/schema";
34
import { Button, Input } from "@cap/ui";
45
import { faImage } from "@fortawesome/free-solid-svg-icons";
56
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
67
import { Effect } from "effect";
78
import Image from "next/image";
89
import { useRouter } from "next/navigation";
9-
import type { User } from "next-auth";
1010
import { startTransition, useRef, useState } from "react";
1111
import { toast } from "sonner";
1212
import { useEffectMutation } from "@/lib/EffectRuntime";
1313
import { withRpc } from "@/lib/Rpcs";
1414
import { Base } from "./Base";
1515

16-
export function OrganizationSetupPage({ user }: { user: User }) {
16+
export function OrganizationSetupPage({
17+
user,
18+
}: {
19+
user: typeof users.$inferSelect | null;
20+
}) {
1721
const [organizationName, setOrganizationName] = useState(
18-
`${user.name}'s organization` || "",
22+
user ? `${user.name}'s organization` : "",
1923
);
2024
const [selectedFile, setSelectedFile] = useState<File | null>(null);
2125
const fileInputRef = useRef<HTMLInputElement>(null);

0 commit comments

Comments
 (0)