Add functionality to create a validator #28
@ -41,15 +41,15 @@ function App() {
|
||||
<Route
|
||||
path="/onboarding-success"
|
||||
element={<OnboardingSuccess />}
|
||||
></Route>
|
||||
/>
|
||||
<Route
|
||||
path="/validator"
|
||||
element={<Validator />}
|
||||
></Route>
|
||||
/>
|
||||
<Route
|
||||
path="/validator-success"
|
||||
element={<ValidatorSuccess />}
|
||||
></Route>
|
||||
/>
|
||||
</Route>
|
||||
<Route path="*" element={<PageNotFound />} />
|
||||
</Routes>
|
||||
|
@ -16,6 +16,7 @@ const TermsAndConditionsBox = ({ height, onLoad }: TermsAndConditionsBoxProps )
|
||||
|
||||
function onDocumentLoadSuccess({ numPages }: { numPages: number }): void {
|
||||
setNumPages(numPages);
|
||||
|
||||
if (onLoad){
|
||||
onLoad();
|
||||
};
|
||||
|
@ -15,25 +15,27 @@ const ConnectWallet = () => {
|
||||
|
||||
const redirectTo = searchParams.get("redirectTo");
|
||||
|
||||
useEffect(()=>{
|
||||
useEffect(() => {
|
||||
if (signClient && !session) {
|
||||
checkPersistedState(signClient);
|
||||
}
|
||||
}, [checkPersistedState, signClient, session]);
|
||||
|
||||
useEffect(() => {
|
||||
if (session) {
|
||||
if (redirectTo){
|
||||
navigate(`/${redirectTo}`, {
|
||||
state: location.state
|
||||
});
|
||||
if (!session) {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
navigate("/sign-with-nitro-key", {
|
||||
state: location.state
|
||||
});
|
||||
}
|
||||
if (redirectTo) {
|
||||
navigate(`/${redirectTo}`, {
|
||||
state: location.state
|
||||
});
|
||||
}
|
||||
|
||||
else {
|
||||
navigate("/sign-with-nitro-key", {
|
||||
state: location.state
|
||||
});
|
||||
}
|
||||
}, [session, navigate, redirectTo, location.state]);
|
||||
|
||||
|
@ -24,7 +24,7 @@ const SignWithNitroKey = () => {
|
||||
const location = useLocation();
|
||||
|
||||
useEffect(() => {
|
||||
if (!session){
|
||||
if (!session) {
|
||||
navigate("/connect-wallet?redirectTo=sign-with-nitro-key", {
|
||||
state: location.state,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user