Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
Merge branch '3.0-react' into fix/sync-delegate-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
goga-m committed Aug 27, 2020
2 parents 9260f63 + d0d2c73 commit 2066881
Show file tree
Hide file tree
Showing 120 changed files with 15,453 additions and 15,653 deletions.
8 changes: 7 additions & 1 deletion src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ import { Environment } from "@arkecosystem/platform-sdk-profiles";
// import { XRP } from "@arkecosystem/platform-sdk-xrp";
import { ApplicationError, Offline } from "domains/error/pages";
import { Splash } from "domains/splash/pages";
import React, { useLayoutEffect, useState } from "react";
import React, { useEffect, useLayoutEffect, useState } from "react";
import { ErrorBoundary } from "react-error-boundary";
import { I18nextProvider } from "react-i18next";
import { useLocation } from "react-router-dom";
import fixtureData from "tests/fixtures/env/storage.json";
import { StubStorage } from "tests/mocks";

Expand All @@ -37,6 +38,7 @@ const Main = ({ syncInterval }: Props) => {
const { env, persist } = useEnvironmentContext();

const isOnline = useNetworkStatus();
const { pathname } = useLocation();

const syncDelegates = (env: Environment) => {
console.log("Running delegates sync...");
Expand All @@ -56,6 +58,10 @@ const Main = ({ syncInterval }: Props) => {
});
};

useEffect(() => {
window.scrollTo(0, 0);
}, [pathname]);

useLayoutEffect(() => {
const boot = async () => {
await env.verify(fixtureData);
Expand Down

0 comments on commit 2066881

Please sign in to comment.