From 4490dddf6349c92df134bd86694f0fd89eb307ae Mon Sep 17 00:00:00 2001 From: vipin Date: Tue, 30 Jan 2024 09:17:30 +0530 Subject: [PATCH 1/2] add redirects and fix css loading for fleek --- package.json | 2 ++ public/charting_library/bundles/3876.fbb750fd312778403036.css | 1 + src/App/App.js | 3 +-- src/index.tsx | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 3b46c8256a..b2341dff59 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,7 @@ "react-error-overlay": "6.0.9" }, "scripts": { + "add-redirects": "mv _redirects_ref public/_redirects", "start": "PORT=3010 react-app-rewired start", "start-home": "yarn lingui:prepare && PORT=3010 env-cmd -e development-home react-app-rewired start", "start-app": "yarn lingui:prepare && PORT=3011 env-cmd -e development-app react-app-rewired start", @@ -73,6 +74,7 @@ "build": "INLINE_RUNTIME_CHUNK=false react-app-rewired build", "build-home": "INLINE_RUNTIME_CHUNK=false env-cmd -e production-home react-app-rewired build", "build-app": "INLINE_RUNTIME_CHUNK=false env-cmd -e production-app react-app-rewired build", + "build-fleek": "yarn add-redirects && INLINE_RUNTIME_CHUNK=false env-cmd -e production-app react-app-rewired build", "test": "react-app-rewired test --transformIgnorePatterns \"node_modules/(?!@wagmi)/\"", "test:ci": "react-app-rewired test --watchAll=false --transformIgnorePatterns \"node_modules/(?!@wagmi)/\"", "eject": "react-scripts eject", diff --git a/public/charting_library/bundles/3876.fbb750fd312778403036.css b/public/charting_library/bundles/3876.fbb750fd312778403036.css index e69de29bb2..a47cf449ff 100644 --- a/public/charting_library/bundles/3876.fbb750fd312778403036.css +++ b/public/charting_library/bundles/3876.fbb750fd312778403036.css @@ -0,0 +1 @@ +/* empty message */ diff --git a/src/App/App.js b/src/App/App.js index acc07be648..4425b5f768 100644 --- a/src/App/App.js +++ b/src/App/App.js @@ -4,7 +4,7 @@ import { useEffect, useRef, useState, useCallback } from "react"; import { SWRConfig } from "swr"; import "@wagmi/connectors"; -import { Redirect, Route, HashRouter as Router, Switch, useHistory, useLocation } from "react-router-dom"; +import { Redirect, Route, Switch, useHistory, useLocation } from "react-router-dom"; import { BASIS_POINTS_DIVISOR } from "config/factors"; import { getAppBaseUrl, isHomeSite, REFERRAL_CODE_QUERY_PARAM } from "lib/legacy"; @@ -710,7 +710,6 @@ function App() { app = {app}; app = {app}; app = {app}; - app = {app}; app = {app}; app = {app}; app = ( diff --git a/src/index.tsx b/src/index.tsx index 7f00c805a1..7f0367aa1c 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import ReactDOM from "react-dom"; import "regenerator-runtime/runtime"; -import { BrowserRouter as Router } from "react-router-dom"; +import { HashRouter as Router } from "react-router-dom"; import App from "./App/App"; import reportWebVitals from "./reportWebVitals"; import WalletProvider from "lib/wallets/WalletProvider"; From 5ea311793ccc2176ababf54063dbdcf366b99cc7 Mon Sep 17 00:00:00 2001 From: vipin Date: Tue, 30 Jan 2024 09:30:26 +0530 Subject: [PATCH 2/2] add redirects ref --- _redirects_ref | 1 + 1 file changed, 1 insertion(+) create mode 100644 _redirects_ref diff --git a/_redirects_ref b/_redirects_ref new file mode 100644 index 0000000000..89cb14a1d9 --- /dev/null +++ b/_redirects_ref @@ -0,0 +1 @@ +/* /#/:splat 301 \ No newline at end of file