Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add redirects and fix css loading for fleek #778

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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 _redirects_ref
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* /#/:splat 301
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@
"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",
"start-win": "set PORT=3010&react-app-rewired start",
"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",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* empty message */
3 changes: 1 addition & 2 deletions src/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 { getAppBaseUrl, isHomeSite, REFERRAL_CODE_QUERY_PARAM } from "lib/legacy";

Expand Down Expand Up @@ -541,7 +541,6 @@ function App() {
app = <I18nProvider i18n={i18n}>{app}</I18nProvider>;
app = <SyntheticsEventsProvider setPendingTxns={setPendingTxns}>{app}</SyntheticsEventsProvider>;
app = <WebsocketContextProvider>{app}</WebsocketContextProvider>;
app = <Router>{app}</Router>;
app = <SEO>{app}</SEO>;
app = <SettingsContextProvider>{app}</SettingsContextProvider>;
app = <SWRConfig value={SWRConfigProp}>{app}</SWRConfig>;
Expand Down
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down