Skip to content

Commit

Permalink
fix: resolve merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
hollannikas committed Oct 11, 2024
1 parent d4f5b34 commit 799cd93
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/web/src/components/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Callbacks, Products } from "@stytch/vanilla-js"
import { Container } from "@radix-ui/themes"

const Login = () => {
const REDIRECT_URL = "http://localhost:5173/dashboard"
const REDIRECT_URL = "/dashboard"
const config = {
products: [Products.passwords],
passwordOptions: {
Expand All @@ -19,27 +19,27 @@ const Login = () => {
// TODO: add more event types as needed
console.log(event)
if (
(event.type === "AUTHENTICATE_FLOW_COMPLETE" || event.type === "PASSWORD_AUTHENTICATE") &&
event.data?.user
(event.type === "AUTHENTICATE_FLOW_COMPLETE" || event.type === "PASSWORD_AUTHENTICATE") &&
event.data?.user
) {
window.location.href = REDIRECT_URL
}
},
}

return (
<Container align="center" width={"auto"}>
<StytchLogin
config={config}
callbacks={callbacks}
styles={{
logo: {
logoImageUrl: "https://trey.fi/media/trey_tunnus_musta-1.png",
},
}}
/>
</Container>
<Container align="center" width={"auto"}>
<StytchLogin
config={config}
callbacks={callbacks}
styles={{
logo: {
logoImageUrl: "https://trey.fi/media/trey_tunnus_musta-1.png",
},
}}
/>
</Container>
)
}

export default Login
export default Login

0 comments on commit 799cd93

Please sign in to comment.