diff --git a/apps/playground/src/components/Authorize.tsx b/apps/playground/src/components/Authorize.tsx index a210f06..2960fe9 100644 --- a/apps/playground/src/components/Authorize.tsx +++ b/apps/playground/src/components/Authorize.tsx @@ -1,18 +1,18 @@ import { authorize } from "@sky-mavis/waypoint" import { useAtomValue } from "jotai" import { Button } from "src/@/components/ui/button" -import { waypointConfigAtom } from "src/atom/env-config" +import { environmentConfigAtom } from "src/atom/env-config" import { useWrapToast } from "src/hooks/useWrapToast" export const Authorize = () => { - const { clientId, origin } = useAtomValue(waypointConfigAtom) + const { clientId, waypointOrigin } = useAtomValue(environmentConfigAtom) const { toastSuccess } = useWrapToast() const handleAuthorize = async () => { const result = await authorize({ mode: "popup", clientId, - waypointOrigin: origin, + waypointOrigin, }) console.debug("🚀 | Authorization Result:", result) diff --git a/apps/playground/src/components/RedirectAuthorize.tsx b/apps/playground/src/components/RedirectAuthorize.tsx index a1e3b9d..6c1e443 100644 --- a/apps/playground/src/components/RedirectAuthorize.tsx +++ b/apps/playground/src/components/RedirectAuthorize.tsx @@ -2,18 +2,18 @@ import { authorize, parseRedirectUrl } from "@sky-mavis/waypoint" import { useAtomValue } from "jotai" import { useEffect } from "react" import { Button } from "src/@/components/ui/button" -import { waypointConfigAtom } from "src/atom/env-config" +import { environmentConfigAtom } from "src/atom/env-config" import { useWrapToast } from "src/hooks/useWrapToast" export const RedirectAuthorize = () => { - const { clientId, origin } = useAtomValue(waypointConfigAtom) + const { clientId, waypointOrigin } = useAtomValue(environmentConfigAtom) const { toastSuccess } = useWrapToast() const handleRedirectAuthorize = async () => { authorize({ mode: "redirect", clientId, - waypointOrigin: origin, + waypointOrigin, }) }