diff --git a/.env.example b/.env.example index d1c2189e10..9630759c9a 100644 --- a/.env.example +++ b/.env.example @@ -1,17 +1,9 @@ -# Required -# Covalent (https://www.covalenthq.com/) -VITE_COVALENT_API_KEY="" - -# Optional -# Toggle to "true" to use Olympus Give features -VITE_GIVE_ENABLED="true" -# This should be toggled to "true" if you need to use the mock sOHM contract -# (which allows for on-demand rebasing) -VITE_MOCK_SOHM_ENABLED="false" # Optional # Google Analytics (https://analytics.google.com/) VITE_GOOGLE_ANALYTICS_API_KEY="" +# Google Analytics 4 API Key +VITE_GA_4_API_KEY="" # Optional # If you run your own node, you can provide connection url(s) to that node. @@ -25,14 +17,6 @@ VITE_FANTOM_TESTNET_NODE_URL="" VITE_POLYGON_NODE_URL="" VITE_POLYGON_TESTNET_NODE_URL="" -# Olympus Give -# These 2 settings should be toggled to "true" if you want to use Olympus Give features -VITE_GIVE_ENABLED="true" -VITE_GIVE_GRANTS_ENABLED="true" - -# This should be toggled to "true" if you need to use the mock sOHM contract -# (which allows for on-demand rebasing) -VITE_MOCK_SOHM_ENABLED="false" VITE_ARBITRUM_NODE_URL="" VITE_ARBITRUM_TESTNET_NODE_URL="" @@ -41,4 +25,7 @@ VITE_AVALANCHE_NODE_URL="" VITE_AVALANCHE_TESTNET_NODE_URL="" # Get a wallet connect project id here: https://cloud.walletconnect.com -VITE_WALLETCONNECT_PROJECT_ID="" \ No newline at end of file +VITE_WALLETCONNECT_PROJECT_ID="" + +#Subgraph URL for Protocol Metrics. If not set Protocol Metrics will not be displayed. +VITE_WG_PUBLIC_NODE_URL="" diff --git a/README.md b/README.md index 8d12c379d3..5f96f8b8b0 100644 --- a/README.md +++ b/README.md @@ -229,3 +229,11 @@ If editing the production content, opt to create a new branch and pull request, ## 🗣 Community and Contributions - [Join our Discord](https://discord.gg/OlympusDAO) and ask how you can get involved with the DAO! + + + +## Deploy Your Own Frontend + +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FOlympusDAO%2Folympus-frontend&env=VITE_WALLETCONNECT_PROJECT_ID&envDescription=Please%20see%20.env.example%20for%20all%20other%20optional%20ENV%20variables&envLink=https%3A%2F%2Fgithub.com%2FOlympusDAO%2Folympus-frontend%2Fblob%2Fdevelop%2F.env.example) +[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/OlympusDAO/olympus-frontend) + diff --git a/src/App.tsx b/src/App.tsx index a1ff35bee4..0694cbd14e 100755 --- a/src/App.tsx +++ b/src/App.tsx @@ -21,6 +21,7 @@ import StagingNotification from "src/components/StagingNotification"; import { StakeVersionContainer } from "src/components/StakeVersionContainer"; import TopBar from "src/components/TopBar/TopBar"; import { shouldTriggerSafetyCheck } from "src/helpers"; +import { Environment } from "src/helpers/environment/Environment/Environment"; import { useGoogleAnalytics } from "src/hooks/useGoogleAnalytics"; import useTheme from "src/hooks/useTheme"; import { chains } from "src/hooks/wagmi"; @@ -202,6 +203,8 @@ function App() { if (isSidebarExpanded) handleSidebarClose(); }, [location]); + const protocolMetricsEnabled = Boolean(Environment.getWundergraphNodeUrl()); + const defaultRoute = protocolMetricsEnabled ? "/dashboard" : "/my-balances"; return ( }> } /> - } /> + } /> } diff --git a/src/components/Sidebar/NavContent.tsx b/src/components/Sidebar/NavContent.tsx index 902461b1aa..c995084cec 100644 --- a/src/components/Sidebar/NavContent.tsx +++ b/src/components/Sidebar/NavContent.tsx @@ -7,6 +7,7 @@ import { ReactComponent as lendAndBorrowIcon } from "src/assets/icons/lendAndBor import { ReactComponent as OlympusIcon } from "src/assets/icons/olympus-nav-header.svg"; import NavItem from "src/components/library/NavItem"; import { DecimalBigNumber } from "src/helpers/DecimalBigNumber/DecimalBigNumber"; +import { Environment } from "src/helpers/environment/Environment/Environment"; import { useTestableNetworks } from "src/hooks/useTestableNetworks"; import { BondDiscount } from "src/views/Bond/components/BondDiscount"; import { DetermineRangeDiscount } from "src/views/Range/hooks"; @@ -29,6 +30,7 @@ const NavContent: React.VFC = () => { const { chain = { id: 1 } } = useNetwork(); const networks = useTestableNetworks(); + const protocolMetricsEnabled = Boolean(Environment.getWundergraphNodeUrl()); return ( @@ -50,7 +52,7 @@ const NavContent: React.VFC = () => {