chore: fix types

This commit is contained in:
Yordis Prieto
2024-08-27 22:31:08 -04:00
parent 4e11714f79
commit 8e79388381
4 changed files with 7 additions and 14 deletions

View File

@@ -8,7 +8,6 @@ import Alert from "./Alert";
import { Spinner } from "./Spinner";
import BackButton from "./BackButton";
import { Checks } from "@zitadel/proto/zitadel/session/v2/session_service_pb";
import { RequestChallenges } from "@zitadel/proto/zitadel/session/v2/challenge_pb";
// either loginName or sessionId must be provided
type Props = {
@@ -79,7 +78,7 @@ export default function LoginPasskey({
loginName,
sessionId,
organization,
challenges: RequestChallenges.fromJson({
challenges: {
webAuthN: {
domain: "",
// USER_VERIFICATION_REQUIREMENT_UNSPECIFIED = 0;
@@ -88,7 +87,7 @@ export default function LoginPasskey({
// USER_VERIFICATION_REQUIREMENT_DISCOURAGED = 3; - mfa
userVerificationRequirement: userVerificationRequirement,
},
}),
},
authRequestId,
}),
});

View File

@@ -27,11 +27,6 @@ export function SignInWithIDP({
authRequestId,
organization,
}: SignInWithIDPProps) {
// TODO: remove casting when bufbuild/protobuf-es@v2 is released
identityProviders = identityProviders.map((idp) =>
IdentityProvider.fromJson(idp as any),
);
const [loading, setLoading] = useState<boolean>(false);
const [error, setError] = useState<string>("");
const router = useRouter();

View File

@@ -1,13 +1,12 @@
"use client";
import { setTheme } from "@/utils/colors";
import { useEffect } from "react";
import { ReactNode, useEffect } from "react";
import { BrandingSettings } from "@zitadel/proto/zitadel/settings/v2/branding_settings_pb";
import { PartialMessage } from "@zitadel/client";
type Props = {
branding: PartialMessage<BrandingSettings> | undefined;
children: React.ReactNode;
branding: BrandingSettings | undefined;
children: ReactNode;
};
const ThemeWrapper = ({ children, branding }: Props) => {

View File

@@ -1,6 +1,6 @@
"use client";
import { useEffect, useState } from "react";
import { ReactNode, useEffect, useState } from "react";
import { Button, ButtonVariants } from "./Button";
import { TextInput } from "./Input";
import { useForm } from "react-hook-form";
@@ -24,7 +24,7 @@ type Props = {
organization?: string;
submit: boolean;
allowRegister: boolean;
children?: React.ReactNode;
children?: ReactNode;
};
export default function UsernameForm({