Skip to content

Commit d2cb78b

Browse files
arpitgupta1214sweetmantech
authored andcommitted
refactor: restore org settings local state type
1 parent e60d74b commit d2cb78b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

hooks/useOrgSettings.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,26 @@ import { getClientApiBaseUrl } from "@/lib/api/getClientApiBaseUrl";
66
import useAccountOrganizations from "./useAccountOrganizations";
77
import { usePrivy } from "@privy-io/react-auth";
88
import { updateAccountProfile } from "@/lib/accounts/updateAccountProfile";
9-
import type { AccountWithDetails } from "@/lib/supabase/accounts/getAccountWithDetails";
109

1110
interface KnowledgeItem {
1211
name: string;
1312
url: string;
1413
type: string;
1514
}
1615

16+
interface OrgData {
17+
id: string;
18+
name: string;
19+
image?: string;
20+
instruction?: string;
21+
knowledges?: KnowledgeItem[];
22+
}
23+
1724
const useOrgSettings = (orgId: string | null) => {
1825
const { data: organizations } = useAccountOrganizations();
1926
const { getAccessToken } = usePrivy();
2027
const queryClient = useQueryClient();
21-
const [orgData, setOrgData] = useState<AccountWithDetails | null>(null);
28+
const [orgData, setOrgData] = useState<OrgData | null>(null);
2229
const [name, setName] = useState("");
2330
const [image, setImage] = useState("");
2431
const [instruction, setInstruction] = useState("");

0 commit comments

Comments
 (0)