Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4911d1054 |
2
.github/workflows/release.yaml
vendored
2
.github/workflows/release.yaml
vendored
@@ -47,7 +47,7 @@ jobs:
|
|||||||
run: yarn install --ignore-scripts --frozen-lockfile
|
run: yarn install --ignore-scripts --frozen-lockfile
|
||||||
|
|
||||||
- name: Build the IPFS bundle
|
- name: Build the IPFS bundle
|
||||||
run: yarn ipfs-build
|
run: yarn build
|
||||||
|
|
||||||
- name: Pin to IPFS
|
- name: Pin to IPFS
|
||||||
id: upload
|
id: upload
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Uniswap Frontend
|
# Uniswap Frontend
|
||||||
|
|
||||||
[](https://github.com/Uniswap/uniswap-frontend/actions?query=workflow%3ATests)
|
[](https://github.com/Uniswap/uniswap-interface/actions?query=workflow%3ATests)
|
||||||
[](https://prettier.io/)
|
[](https://prettier.io/)
|
||||||
|
|
||||||
An open source interface for Uniswap -- a protocol for decentralized exchange of Ethereum tokens.
|
An open source interface for Uniswap -- a protocol for decentralized exchange of Ethereum tokens.
|
||||||
@@ -16,7 +16,7 @@ An open source interface for Uniswap -- a protocol for decentralized exchange of
|
|||||||
## Accessing the frontend
|
## Accessing the frontend
|
||||||
|
|
||||||
To access the front end, use an IPFS gateway link from the
|
To access the front end, use an IPFS gateway link from the
|
||||||
[latest release](https://github.com/Uniswap/uniswap-frontend/releases/latest)
|
[latest release](https://github.com/Uniswap/uniswap-interface/releases/latest)
|
||||||
or visit [uniswap.exchange](https://uniswap.exchange).
|
or visit [uniswap.exchange](https://uniswap.exchange).
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
@@ -54,4 +54,4 @@ CI checks will run against all PRs.
|
|||||||
## Accessing Uniswap V1 interface
|
## Accessing Uniswap V1 interface
|
||||||
|
|
||||||
The Uniswap V1 interface for mainnet and testnets is accessible via IPFS gateways linked
|
The Uniswap V1 interface for mainnet and testnets is accessible via IPFS gateways linked
|
||||||
from the [v1.0.0 release](https://github.com/Uniswap/uniswap-frontend/releases/tag/v1.0.0).
|
from the [v1.0.0 release](https://github.com/Uniswap/uniswap-interface/releases/tag/v1.0.0).
|
||||||
27
netlify.toml
27
netlify.toml
@@ -1,27 +0,0 @@
|
|||||||
# block some countries
|
|
||||||
[[redirects]]
|
|
||||||
from = "/*"
|
|
||||||
to = "/451.html"
|
|
||||||
status = 451
|
|
||||||
force = true
|
|
||||||
conditions = {Country=["BY","CU","IR","IQ","CI","LR","KP","SD","SY","ZW"]}
|
|
||||||
headers = {Link="<https://uniswap.exchange>"}
|
|
||||||
|
|
||||||
# forward migrate
|
|
||||||
[[redirects]]
|
|
||||||
from = "https://migrate.uniswap.exchange/*"
|
|
||||||
to = "https://uniswap.exchange/migrate/v1"
|
|
||||||
status = 301
|
|
||||||
force = true
|
|
||||||
|
|
||||||
# forward v2 subdomain to apex
|
|
||||||
[[redirects]]
|
|
||||||
from = "https://v2.uniswap.exchange/*"
|
|
||||||
to = "https://uniswap.exchange/:splat"
|
|
||||||
status = 301
|
|
||||||
|
|
||||||
# support SPA setup
|
|
||||||
[[redirects]]
|
|
||||||
from = "/*"
|
|
||||||
to = "/index.html"
|
|
||||||
status = 200
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@uniswap/interface",
|
"name": "@uniswap/interface",
|
||||||
"description": "Uniswap Interface",
|
"description": "Uniswap Interface",
|
||||||
"homepage": "https://uniswap.exchange",
|
"homepage": ".",
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ethersproject/address": "^5.0.0-beta.134",
|
"@ethersproject/address": "^5.0.0-beta.134",
|
||||||
@@ -81,7 +81,6 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start",
|
||||||
"build": "react-scripts build",
|
"build": "react-scripts build",
|
||||||
"ipfs-build": "cross-env PUBLIC_URL=\".\" react-scripts build",
|
|
||||||
"test": "react-scripts test --env=jsdom",
|
"test": "react-scripts test --env=jsdom",
|
||||||
"eject": "react-scripts eject",
|
"eject": "react-scripts eject",
|
||||||
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
|
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ const MenuItem = styled(ExternalLink)`
|
|||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
const CODE_LINK = 'https://github.com/Uniswap/uniswap-frontend'
|
const CODE_LINK = 'https://github.com/Uniswap/uniswap-interface'
|
||||||
|
|
||||||
export default function Menu() {
|
export default function Menu() {
|
||||||
const node = useRef<HTMLDivElement>()
|
const node = useRef<HTMLDivElement>()
|
||||||
|
|||||||
@@ -3,15 +3,13 @@ import { initReactI18next } from 'react-i18next'
|
|||||||
import XHR from 'i18next-xhr-backend'
|
import XHR from 'i18next-xhr-backend'
|
||||||
import LanguageDetector from 'i18next-browser-languagedetector'
|
import LanguageDetector from 'i18next-browser-languagedetector'
|
||||||
|
|
||||||
const LOAD_PATH: string = process.env.PUBLIC_URL === '.' ? `./locales/{{lng}}.json` : '/locales/{{lng}}.json'
|
|
||||||
|
|
||||||
i18next
|
i18next
|
||||||
.use(XHR)
|
.use(XHR)
|
||||||
.use(LanguageDetector)
|
.use(LanguageDetector)
|
||||||
.use(initReactI18next)
|
.use(initReactI18next)
|
||||||
.init({
|
.init({
|
||||||
backend: {
|
backend: {
|
||||||
loadPath: LOAD_PATH
|
loadPath: `./locales/{{lng}}.json`
|
||||||
},
|
},
|
||||||
react: {
|
react: {
|
||||||
useSuspense: true
|
useSuspense: true
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { Suspense } from 'react'
|
import React, { Suspense } from 'react'
|
||||||
import { BrowserRouter, HashRouter, Route, Switch } from 'react-router-dom'
|
import { HashRouter, Route, Switch } from 'react-router-dom'
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
import GoogleAnalyticsReporter from '../components/analytics/GoogleAnalyticsReporter'
|
import GoogleAnalyticsReporter from '../components/analytics/GoogleAnalyticsReporter'
|
||||||
import Header from '../components/Header'
|
import Header from '../components/Header'
|
||||||
@@ -53,17 +53,10 @@ const Marginer = styled.div`
|
|||||||
margin-top: 5rem;
|
margin-top: 5rem;
|
||||||
`
|
`
|
||||||
|
|
||||||
let Router: React.ComponentType
|
|
||||||
if (process.env.PUBLIC_URL === '.') {
|
|
||||||
Router = HashRouter
|
|
||||||
} else {
|
|
||||||
Router = BrowserRouter
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function App() {
|
export default function App() {
|
||||||
return (
|
return (
|
||||||
<Suspense fallback={null}>
|
<Suspense fallback={null}>
|
||||||
<Router>
|
<HashRouter>
|
||||||
<Route component={GoogleAnalyticsReporter} />
|
<Route component={GoogleAnalyticsReporter} />
|
||||||
<Route component={DarkModeQueryParamReader} />
|
<Route component={DarkModeQueryParamReader} />
|
||||||
<AppWrapper>
|
<AppWrapper>
|
||||||
@@ -91,7 +84,7 @@ export default function App() {
|
|||||||
<Marginer />
|
<Marginer />
|
||||||
</BodyWrapper>
|
</BodyWrapper>
|
||||||
</AppWrapper>
|
</AppWrapper>
|
||||||
</Router>
|
</HashRouter>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user