Skip to content

Commit

Permalink
Revert "Chore/remove unnecessary components (#4105)" (#4106)
Browse files Browse the repository at this point in the history
This reverts commit 0dd296a.
  • Loading branch information
Kammerlo authored Nov 11, 2024
1 parent 0dd296a commit ab411dc
Show file tree
Hide file tree
Showing 123 changed files with 3,130 additions and 5,629 deletions.
33 changes: 15 additions & 18 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
PORT = 3000
REACT_APP_VERSION=$npm_package_version
REACT_APP_API_URL=http://localhost:8080/api/v1
REACT_APP_PREPROD_API_URL=https://api.uat.cf-explorer-preprod.eu-west-1.metadata.dev.cf-deployments.org/api/v1
REACT_APP_PREVIEW_API_URL=https://api.uat.cf-explorer-preview.eu-west-1.metadata.dev.cf-deployments.org/api/v1
REACT_APP_MAINNET_API_URL=https://api.uat.cf-explorer-mainnet.eu-west-1.metadata.dev.cf-deployments.org/api/v1
REACT_APP_AUTH_API_URL=https://auth-api.uat.cf-explorer-preview.eu-west-1.metadata.dev.cf-deployments.org/api/v1
REACT_APP_TESTNET_APP_URL=
REACT_APP_PREVIEW_APP_URL=https://uat.cf-explorer-preview.eu-west-1.metadata.dev.cf-deployments.org
REACT_APP_PREPROD_APP_URL=https://uat.cf-explorer-preprod.eu-west-1.metadata.dev.cf-deployments.org
REACT_APP_MAINNET_APP_URL=https://uat.cf-explorer-mainnet.eu-west-1.metadata.dev.cf-deployments.org
REACT_APP_NETWORK=mainnet
REACT_APP_JSD_WIDGET_KEY=9b9fab2d-676f-4359-a824-36cb99c247c1
REACT_APP_NETWORK_NAMES='{"mainnet":"Mainnet","preprod":"Preprod","preview":"Preview","sanchonet":"Sanchonet"}'

REACT_APP_CARDANO_NEWS_URL = https://cardanofoundation.org/blog/
REACT_APP_WS_URL = wss://api.uat.cf-explorer-preview.eu-west-1.metadata.dev.cf-deployments.org/ws
REACT_APP_ADA_HANDLE_API=https://adahandle-resolver.uat.cf-explorer-mainnet.eu-west-1.metadata.dev.cf-deployments.org/api/v1
REACT_APP_BOLNISI_NAME_API = https://minio.pro.cf-bolnisi-mainnet.eu-west-1.bnwa.metadata.dev.cf-deployments.org/georgian-wine/public/winerymapping.json
REACT_APP_API_URL_COIN_GECKO = https://api.coingecko.com/api/v3/coins/markets
REACT_APP_FF_SANCHONET_VOTE_SECTION_AVAILABLE=false
REACT_APP_API_URL =
REACT_APP_WS_URL =
REACT_APP_AUTH_API_URL =
REACT_APP_TESTNET_APP_URL =
REACT_APP_PREVIEW_APP_URL =
REACT_APP_PREPROD_APP_URL =
REACT_APP_MAINNET_APP_URL =
REACT_APP_SANCHONET_APP_URL =
REACT_APP_NETWORK = mainnet
REACT_APP_EXT_ADA_PRICE_URL =
REACT_APP_JSD_WIDGET_KEY =
REACT_APP_CARDANO_NEWS_URL =
REACT_APP_ADA_HANDLE_API =
REACT_APP_NETWORK_NAMES =
REACT_APP_BOLNISI_NAME_API =
67 changes: 67 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require("path");

module.exports = {
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:jsx-a11y/recommended",
"plugin:@typescript-eslint/recommended",
"eslint-config-prettier",
"prettier"
],
plugins: ["prettier"],
settings: {
react: {
version: "detect"
},
"import/resolver": {
node: {
paths: [path.resolve(__dirname, "")],
extensions: [".js", ".jsx", ".ts", ".tsx"]
},
typescript: {
project: path.resolve(__dirname, "./tsconfig.json")
}
}
},
env: {
node: true
},
rules: {
"no-console": process.env.NODE_ENV === "development" ? "warn" : "error",
"react/react-in-jsx-scope": "off",
"react/jsx-no-target-blank": "warn",
"react-hooks/exhaustive-deps": "off",
"react/prop-types": "off",
"react/no-unescaped-entities": 0,
"import/no-named-as-default": 0,
"@typescript-eslint/no-unused-vars": process.env.NODE_ENV === "development" ? "warn" : "error",
"@typescript-eslint/no-explicit-any": "error",
"import/order": [
"error",
{
groups: [["builtin", "external"], ["internal"], ["parent", "sibling"], "unknown"],
pathGroups: [{ pattern: "commons/**", group: "unknown" }],
"newlines-between": "always"
}
],
"prettier/prettier": [
"warn",
{
arrowParens: "always",
semi: true,
trailingComma: "none",
tabWidth: 2,
endOfLine: "auto",
useTabs: false,
singleQuote: false,
printWidth: 120,
jsxSingleQuote: false
}
]
}
};
67 changes: 45 additions & 22 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@
-->
<link rel="manifest" href="/manifest.json" />

<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
_paq.push(['setCustomUrl', 'https://beta.explorer.cardano.org/']);
(function() {
var u="https://cardanofoundation.matomo.cloud/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '8']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src='https://cdn.matomo.cloud/cardanofoundation.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->

<!--
Notice the use of in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand All @@ -44,29 +61,35 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
<!-- <script src="/assets/env.global.js" type="text/javascript"></script>-->
<script src="/assets/env.global.js" type="text/javascript"></script>

<!-- <script type="module">-->
<!-- import init, { decode } from "/lib/pkg/uplc_js.js";-->
<!-- init().then(() => {-->
<!-- window.decodeUPLC = decode;-->
<!-- });-->
<!-- </script>-->
<!-- <script>-->
<!-- var isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent);-->
<!-- document.addEventListener("gesturestart", function (e) {-->
<!-- e.preventDefault();-->
<!-- });-->
<!-- document.addEventListener(-->
<!-- "touchmove",-->
<!-- function (event) {-->
<!-- if (event.scale !== 1 && isIOS) {-->
<!-- event.preventDefault();-->
<!-- }-->
<!-- },-->
<!-- { passive: false }-->
<!-- );-->
<!-- </script>-->
<script type="module">
import init, { decode } from "/lib/pkg/uplc_js.js";
init().then(() => {
window.decodeUPLC = decode;
});
</script>
<script>
var isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent);
document.addEventListener("gesturestart", function (e) {
e.preventDefault();
});
document.addEventListener(
"touchmove",
function (event) {
if (event.scale !== 1 && isIOS) {
event.preventDefault();
}
},
{ passive: false }
);
</script>
<script
data-jsd-embedded
data-key="%REACT_APP_JSD_WIDGET_KEY%"
data-base-url="https://jsd-widget.atlassian.com"
src="https://jsd-widget.atlassian.com/assets/embed.js"
></script>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
62 changes: 14 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"@vitejs/plugin-react": "^4.2.1",
"@vitejs/plugin-react-swc": "^3.5.0",
"axios": "^1.1.3",
"axios-case-converter": "^1.1.1",
"axios-mock-adapter": "^1.21.5",
"bignumber.js": "^9.1.0",
"buffer": "^6.0.3",
Expand Down
4 changes: 4 additions & 0 deletions src/Routers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import EpochDetail from "./pages/EpochDetail";
import ForgotPassword from "./pages/ForgotPassword";
import Home from "./pages/Home";
import InstantRewards from "./pages/InstantRewards";
import MyProfile from "./pages/MyProfile";
import NotFound from "./pages/NotFound";
import PolicyDetail from "./pages/PolicyDetail";
import ProtocolParameter from "./pages/ProtocolParameter";
Expand All @@ -36,6 +37,7 @@ import ReportGeneratedStakingDetail from "./pages/ReportGeneratedStakingDetail";
import ResetPassword from "./pages/ResetPassword";
import SPOLifecycle from "./pages/SPOLifecycle";
import SearchResult from "./pages/SearchResult";
import SignIn from "./pages/SignIn";
import SignUp from "./pages/SignUp";
import Stake, { STAKE_ADDRESS_TYPE } from "./pages/Stake";
import StakeDelegations from "./pages/StakeDelegations";
Expand Down Expand Up @@ -80,6 +82,7 @@ const Routes: React.FC = () => {

return (
<Switch>
<Route path={routers.SIGN_IN} exact component={SignIn} />
<Route path={routers.SIGN_UP} exact component={SignUp} />
<Route path={routers.VERIFY_EMAIL} exact component={VerifyEmail} />
<Route path={routers.FORGOT_PASSWORD} exact component={ForgotPassword} />
Expand Down Expand Up @@ -133,6 +136,7 @@ const Routes: React.FC = () => {
<AccountLayout>
<Switch>
<Route path={routers.ACCOUNT} exact component={() => <Redirect to={routers.MY_PROFILE} />} />
<Route path={routers.MY_PROFILE} exact component={MyProfile} />
<Route path={routers.BOOKMARK} exact component={Bookmark} />
<Route path={routers.NOT_FOUND} component={NotFound} />
</Switch>
Expand Down
Loading

0 comments on commit ab411dc

Please sign in to comment.