onboarding
This commit is contained in:
parent
214dfaba8a
commit
2657a4e146
30
src/App.tsx
30
src/App.tsx
@ -1,5 +1,10 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
|
import {
|
||||||
|
BrowserRouter as Router,
|
||||||
|
Routes,
|
||||||
|
Route,
|
||||||
|
Navigate,
|
||||||
|
} from "react-router-dom";
|
||||||
|
|
||||||
import ConnectWallet from "./pages/ConnectWallet";
|
import ConnectWallet from "./pages/ConnectWallet";
|
||||||
import SignWithNitroKey from "./pages/SignWithNitroKey";
|
import SignWithNitroKey from "./pages/SignWithNitroKey";
|
||||||
@ -9,7 +14,7 @@ import OnboardingSuccess from "./pages/OnboardingSuccess";
|
|||||||
import SignPageLayout from "./layout/SignPageLayout";
|
import SignPageLayout from "./layout/SignPageLayout";
|
||||||
import UserVerification from "./pages/UserVerification";
|
import UserVerification from "./pages/UserVerification";
|
||||||
import TermsAndConditions from "./pages/TermsAndConditions";
|
import TermsAndConditions from "./pages/TermsAndConditions";
|
||||||
import Header from "./components/Header";
|
import HeaderPageLayout from "./layout/HeaderPageLayout";
|
||||||
import { WalletConnectProvider } from "./context/WalletConnectContext";
|
import { WalletConnectProvider } from "./context/WalletConnectContext";
|
||||||
import VerifyEmail from "./pages/VerifyEmail";
|
import VerifyEmail from "./pages/VerifyEmail";
|
||||||
import Email from "./pages/Email";
|
import Email from "./pages/Email";
|
||||||
@ -20,23 +25,36 @@ import "./App.css";
|
|||||||
function App() {
|
function App() {
|
||||||
return (
|
return (
|
||||||
<Router>
|
<Router>
|
||||||
<Header />
|
|
||||||
<WalletConnectProvider>
|
<WalletConnectProvider>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/" element={<TermsAndConditions />} />
|
<Route path="/" element={<Navigate to="/verify-email" replace />} />
|
||||||
|
<Route
|
||||||
|
path="/terms-and-conditions"
|
||||||
|
element={<TermsAndConditions />}
|
||||||
|
/>
|
||||||
<Route path="/verify-email" element={<VerifyEmail />} />
|
<Route path="/verify-email" element={<VerifyEmail />} />
|
||||||
<Route path="/email" element={<Email />} />
|
<Route path="/email" element={<Email />} />
|
||||||
|
|
||||||
|
{/* Routes with Header */}
|
||||||
|
<Route element={<HeaderPageLayout />}>
|
||||||
<Route path="/connect-wallet" element={<ConnectWallet />} />
|
<Route path="/connect-wallet" element={<ConnectWallet />} />
|
||||||
<Route path="/thanks" element={<Thanks />} />
|
<Route path="/thanks" element={<Thanks />} />
|
||||||
|
|
||||||
|
{/* SignPageLayout nested inside HeaderPageLayout */}
|
||||||
<Route element={<SignPageLayout />}>
|
<Route element={<SignPageLayout />}>
|
||||||
<Route path="/sign-with-nitro-key" element={<SignWithNitroKey />} />
|
<Route
|
||||||
|
path="/sign-with-nitro-key"
|
||||||
|
element={<SignWithNitroKey />}
|
||||||
|
/>
|
||||||
<Route path="/user-verification" element={<UserVerification />} />
|
<Route path="/user-verification" element={<UserVerification />} />
|
||||||
<Route path="/sign-with-cosmos" element={<SignWithCosmos />} />
|
<Route path="/sign-with-cosmos" element={<SignWithCosmos />} />
|
||||||
<Route
|
<Route
|
||||||
path="/onboarding-success"
|
path="/onboarding-success"
|
||||||
element={<OnboardingSuccess />}
|
element={<OnboardingSuccess />}
|
||||||
></Route>
|
/>
|
||||||
</Route>
|
</Route>
|
||||||
|
</Route>
|
||||||
|
|
||||||
<Route path="*" element={<PageNotFound />} />
|
<Route path="*" element={<PageNotFound />} />
|
||||||
</Routes>
|
</Routes>
|
||||||
</WalletConnectProvider>
|
</WalletConnectProvider>
|
||||||
|
15
src/layout/HeaderPageLayout.tsx
Normal file
15
src/layout/HeaderPageLayout.tsx
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import React from "react";
|
||||||
|
import { Outlet } from "react-router-dom";
|
||||||
|
|
||||||
|
import Header from "../components/Header";
|
||||||
|
|
||||||
|
const HeaderPageLayout: React.FC = () => {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Header />
|
||||||
|
<Outlet />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default HeaderPageLayout;
|
@ -1,26 +1,30 @@
|
|||||||
import React from 'react';
|
import React from "react";
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
import { Container, Button, Box, Paper } from '@mui/material';
|
import { Container, Button, Box, Paper } from "@mui/material";
|
||||||
|
|
||||||
import TermsAndConditionsBox from '../components/TermsAndConditionsBox';
|
import TermsAndConditionsBox from "../components/TermsAndConditionsBox";
|
||||||
|
|
||||||
const TermsAndConditions = () => {
|
const TermsAndConditions = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const handleAccept = () => {
|
const handleAccept = () => {
|
||||||
navigate('/verify-email');
|
navigate("/verify-email");
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container maxWidth="lg">
|
<Container maxWidth="lg">
|
||||||
<Paper elevation={3} style={{ padding: '2rem', marginTop: '2rem', height: '83vh', display: 'flex', flexDirection: 'column' }}>
|
<Paper
|
||||||
<TermsAndConditionsBox height='80vh' />
|
elevation={3}
|
||||||
<Box mt={2} display="flex" justifyContent="center">
|
style={{
|
||||||
<Button variant="contained" color="primary" onClick={handleAccept}>
|
padding: "2rem",
|
||||||
Accept
|
marginTop: "2rem",
|
||||||
</Button>
|
height: "83vh",
|
||||||
</Box>
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<TermsAndConditionsBox height="80vh" />
|
||||||
</Paper>
|
</Paper>
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
|
@ -1,24 +1,80 @@
|
|||||||
import React from 'react'
|
import React from "react";
|
||||||
|
import { LaconicWithTextIcon } from "../components/CustomIcon";
|
||||||
|
|
||||||
const VerifyEmail = () => {
|
const VerifyEmail: React.FC = () => {
|
||||||
return (
|
return (
|
||||||
<div style={{ display: 'flex', justifyContent: 'center', margin: '20vh' }}>
|
<div className="w-full min-h-screen bg-gradient-to-b from-[#0000f4] to-[#0f0f0f] flex justify-center items-center px-8 pt-8 pb-16">
|
||||||
<iframe
|
<div className="w-full max-w-5xl px-8 pt-8 pb-16 bg-[#181719] rounded-lg flex flex-col md:flex-row gap-20">
|
||||||
title="verify-email"
|
<div className="md:w-1/2 flex-col justify-start items-start gap-12 inline-flex">
|
||||||
src="https://embeds.beehiiv.com/18aaa245-3652-4b0a-94a9-a87054df4914"
|
<div className="w-28 h-5 relative">
|
||||||
data-test-id="beehiiv-embed"
|
<LaconicWithTextIcon color="white" />
|
||||||
width="480"
|
</div>
|
||||||
height="320"
|
<div className="flex-col justify-start items-start gap-6 flex">
|
||||||
frameBorder="0"
|
<h1 className="text-[#fbfbfb] text-4xl font-normal font-['Arthemys Display'] leading-10">
|
||||||
scrolling="no"
|
LORO Testnet
|
||||||
style={{
|
</h1>
|
||||||
borderRadius: '4px',
|
<p className="text-[#bdbcc3] text-lg font-normal font-['TT Hoves'] leading-relaxed">
|
||||||
border: '2px solid #e5e7eb',
|
Register to join the Loro Testnet
|
||||||
backgroundColor: 'transparent',
|
</p>
|
||||||
}}
|
</div>
|
||||||
></iframe>
|
<a
|
||||||
|
href="#"
|
||||||
|
className="text-[#fbfbfb] text-sm font-normal font-['TT Hoves'] underline leading-tight"
|
||||||
|
>
|
||||||
|
Read the Docs
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default VerifyEmail
|
<div className="md:w-1/2 pt-16 flex-col justify-between items-end inline-flex">
|
||||||
|
<form className="w-full space-y-6">
|
||||||
|
<div className="flex-col justify-start items-start gap-2 flex">
|
||||||
|
<label
|
||||||
|
htmlFor="email"
|
||||||
|
className="text-[#fbfbfb] text-base font-normal font-['TT Hoves'] leading-normal"
|
||||||
|
>
|
||||||
|
Email Address
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
id="email"
|
||||||
|
name="email"
|
||||||
|
type="email"
|
||||||
|
required
|
||||||
|
className="w-full h-12 px-3 bg-[#29292d] rounded border border-[#47464f] text-[#fbfbfb] text-sm font-normal font-['TT Hoves'] leading-tight focus:outline-none focus:ring-2 focus:ring-[#0000f4]"
|
||||||
|
placeholder="Enter Email"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<input
|
||||||
|
id="terms"
|
||||||
|
name="terms"
|
||||||
|
type="checkbox"
|
||||||
|
className="w-4 h-4 bg-[#29292d] rounded border border-[#47464f]"
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
htmlFor="terms"
|
||||||
|
className="text-[#fbfbfb] text-sm font-normal font-['TT Hoves'] leading-tight"
|
||||||
|
>
|
||||||
|
I agree to the{" "}
|
||||||
|
<a href="/terms-and-conditions" target="_blank" rel="noopener">
|
||||||
|
<span className="underline">Terms & Conditions</span>
|
||||||
|
</a>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div className="flex justify-end pt-28">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
className="w-60 h-12 px-6 py-4 bg-[#0000f4] rounded justify-center items-center inline-flex"
|
||||||
|
>
|
||||||
|
<span className="text-center text-[#fbfbfb] text-lg font-normal font-['DM Mono'] uppercase leading-none tracking-tight">
|
||||||
|
Register
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default VerifyEmail;
|
||||||
|
Loading…
Reference in New Issue
Block a user