Skip to content

Commit

Permalink
TD-1359: chore: add login callback to checkout sample app. (#1816)
Browse files Browse the repository at this point in the history
  • Loading branch information
naveen-imtb committed May 22, 2024
1 parent 0cb6607 commit 8d42ebf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { useEffect } from "react";
import { passport } from "../passport";

export function PassportLoginCallback() {
useEffect(() => {
passport?.loginCallback();
}, [passport])
return(<></>);
}
7 changes: 7 additions & 0 deletions packages/checkout/sdk-sample-app/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import ConnectWidget from './pages/ConnectWidget';
import { onLightBase } from '@biom3/design-tokens';
import { BiomeCombinedProviders, Box } from '@biom3/react';
import SmartCheckout from './pages/SmartCheckout';
import {
PassportLoginCallback
} from "./components/PassportLoginCallback";

const router = createBrowserRouter([
{
Expand All @@ -22,6 +25,10 @@ const router = createBrowserRouter([
path: '/smart-checkout',
element: <SmartCheckout />,
},
{
path: '/login/callback',
element: <PassportLoginCallback />
},
]);

const root = ReactDOM.createRoot(
Expand Down

0 comments on commit 8d42ebf

Please sign in to comment.