Add functionality to create a validator #28

Merged
nabarun merged 14 commits from deep-stack/testnet-onboarding-app:ag-validator-ui into main 2024-08-09 10:18:14 +00:00
4 changed files with 19 additions and 16 deletions
Showing only changes of commit 57e2c0c628 - Show all commits

View File

@ -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>

View File

@ -16,6 +16,7 @@ const TermsAndConditionsBox = ({ height, onLoad }: TermsAndConditionsBoxProps )
function onDocumentLoadSuccess({ numPages }: { numPages: number }): void {
setNumPages(numPages);
if (onLoad){
onLoad();
};

View File

@ -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]);

View File

@ -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,
});