👔 forwarding callback data

create a type and implement it in props that pass callback data from root to the component that will process the
request.
This commit is contained in:
2025-08-27 22:47:55 +07:00
parent 1bf56603e0
commit 73c5bff44c
4 changed files with 19 additions and 10 deletions

View File

@ -1,12 +1,17 @@
"use client";
import { ParamProps } from "../types/ParamProps";
import { redirect } from "next/navigation";
import React, { useEffect, useState } from "react";
import SecurityCheckup from "@/shared/auth/ui/SecurityCheckup";
import SecurityCheckupFailed from "@/shared/auth/ui/SecurityCheckupFailed";
import LoadingProcess from "../ui/LoadingProcess";
const OauthCallbackHandler = () => {
const OauthCallbackHandler = ({
callbackData,
}: {
callbackData: ParamProps;
}) => {
/**
* Create a lit component that will be used in popp, consisting of 3 component flows:
* 1. When the user opens it, a browser environment check will be performed.
@ -16,7 +21,7 @@ const OauthCallbackHandler = () => {
const componentFlowList = {
securityCheckup: <SecurityCheckup />,
securityCheckupFailed: <SecurityCheckupFailed />,
proceedCallback: <LoadingProcess />,
proceedCallback: <LoadingProcess callbackData={callbackData} />,
};
// State to set the current page component