Skip to content

Commit

Permalink
Move react types to peer deps
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorjdawson committed Dec 18, 2024
1 parent 76f9329 commit d80f46f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/sdk-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@
"usehooks-ts": "^3.1.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"@types/react": "^18.2.75"
},
"devDependencies": {
"@types/react": "^18.2.75",
"postcss-import": "^16.1.0",
"react": "^18.2.0"
},
Expand Down
4 changes: 3 additions & 1 deletion packages/sdk-react/src/components/auth/Auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import { useTurnkey } from "../../hooks/use-turnkey";
import { getVerifiedSuborgs } from "../../actions/getVerifiedSuborgs";
import { FilterType, OtpType, authErrors } from "./constants";

type AuthSection = "email" | "passkey" | "phone" | "socials";

const passkeyIcon = (
<svg xmlns="http://www.w3.org/2000/svg" width="43" height="48" fill="none">
<path
Expand Down Expand Up @@ -354,7 +356,7 @@ const Auth: React.FC<AuthProps> = ({
);
};

const renderSection = (section: string) => {
const renderSection = (section: AuthSection) => {
switch (section) {
case "email":
return authConfig.emailEnabled && !otpId ? (
Expand Down

0 comments on commit d80f46f

Please sign in to comment.