Started working with PayPal
This commit is contained in:
@@ -10,6 +10,7 @@ import {useRouter} from "next/router";
|
||||
import {useEffect} from "react";
|
||||
import useExamStore from "@/stores/examStore";
|
||||
import usePreferencesStore from "@/stores/preferencesStore";
|
||||
import {PayPalScriptProvider} from "@paypal/react-paypal-js";
|
||||
|
||||
export default function App({Component, pageProps}: AppProps) {
|
||||
const reset = useExamStore((state) => state.reset);
|
||||
@@ -31,5 +32,10 @@ export default function App({Component, pageProps}: AppProps) {
|
||||
}
|
||||
}, [setIsSidebarMinimized]);
|
||||
|
||||
return <Component {...pageProps} />;
|
||||
return (
|
||||
<PayPalScriptProvider
|
||||
options={{clientId: process.env.NEXT_PUBLIC_PAYPAL_CLIENT_ID || "", currency: "EUR", intent: "order", commit: true, vault: true}}>
|
||||
<Component {...pageProps} />
|
||||
</PayPalScriptProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ export default function Home() {
|
||||
{user.type === "corporate" && <CorporateDashboard user={user} />}
|
||||
{user.type === "agent" && <AgentDashboard user={user} />}
|
||||
{user.type === "admin" && <AdminDashboard user={user} />}
|
||||
{user.type === "developer" && <AdminDashboard user={user} />}
|
||||
{user.type === "developer" && <StudentDashboard user={user} />}
|
||||
</Layout>
|
||||
)}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user