Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ stellar contract build
| [Contract invariants](docs/CONTRACT-INVARIANTS.md) | Properties the smart contract must never violate |
| [Bug bounty Tier 2](docs/SECURITY-BOUNTY-TIER2.md) | Platform decision and budget for the post-launch program |


## Contract addresses (Testnet)

| Resource | ID |
Expand Down
13 changes: 12 additions & 1 deletion bimex-frontend/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { lazy, Suspense, useState, useEffect, useRef, useCallback } from "react";
import { useTranslation } from "react-i18next";
import { setAllowed } from "@stellar/freighter-api";
import { Navigate, Route, Routes, useLocation, useNavigate } from "react-router";
import { Navigate, Route, Routes, useLocation, useNavigate, useNavigationType } from "react-router";
import ConectarWallet from "./components/ConectarWallet";
import ListaProyectos from "./components/ListaProyectos";
import DetalleProyecto from "./components/DetalleProyecto";
Expand Down Expand Up @@ -283,6 +283,16 @@ function ToastContainer({ toasts, onRemove }) {
);
}

function ScrollToTop() {
const navigationType = useNavigationType();
useEffect(() => {
if (navigationType === "PUSH" || navigationType === "REPLACE") {
window.scrollTo(0, 0);
}
}, [navigationType]);
return null;
}

// ── App ──────────────────────────────────────────────────────────────────────
export default function App() {
const { t, i18n } = useTranslation();
Expand Down Expand Up @@ -440,6 +450,7 @@ export default function App() {

return (
<div>
<ScrollToTop />
<ToastContainer toasts={toasts} onRemove={quitarToast} />
<OnboardingTour isActive={tourActivo} onComplete={() => setTourActivo(false)} />
<PwaInstallBanner
Expand Down
Loading