Skip to content

Commit 98dff87

Browse files
committed
feat: rename pools page
1 parent c9057c4 commit 98dff87

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

src/components/Header/Header.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ const keplrLogoURI =
1515

1616
const pageLinkMap = {
1717
'/swap': 'Swap',
18-
'/pairs': 'Pairs',
19-
'/stake': 'Stake',
18+
'/pools': 'Pools',
2019
};
2120

2221
export default function Header() {

src/pages/App/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function App() {
3838
<Routes>
3939
<Route index element={<MyLiquidityOrTrade />} />
4040
<Route path="swap" element={<Swap />} />
41-
<Route path="pairs/*" element={<Pool />} />
41+
<Route path="pools/*" element={<Pool />} />
4242
<Route path="stake" element={<div>Coming soon</div>} />
4343
<Route path="*" element={<div>Not found</div>} />
4444
</Routes>

src/pages/App/Planets.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ import './Planets.scss';
88

99
const planets: { [planetName: string]: string | undefined } = {
1010
swap: planetTradeSVG,
11-
pairs: planetLiquiditySVG,
11+
pools: planetLiquiditySVG,
1212
};
1313

1414
export default function Planets() {
1515
return (
1616
<>
1717
<Planet name="swap" bottom={0} width={947} right={0} />
18-
<Planet name="pairs" top="10vh" width={774} right={0} />
18+
<Planet name="pools" top="10vh" width={774} right={0} />
1919
</>
2020
);
2121
}

src/pages/Pool/Pool.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,23 +104,23 @@ const restrictPriceRangeValues = (
104104
return '1';
105105
};
106106

107-
export default function PairsPage() {
107+
export default function PoolsPage() {
108108
return (
109109
<div className="container row flex py-5">
110110
<div className="page col flex">
111-
<Pairs />
111+
<Pools />
112112
</div>
113113
</div>
114114
);
115115
}
116116

117-
function Pairs() {
117+
function Pools() {
118118
const navigate = useNavigate();
119119
const [[tokenA, tokenB], setTokens] = useState<[Token?, Token?]>([]);
120120

121121
// change tokens to match pathname
122122
const tokenList = useTokens();
123-
const match = useMatch('/pairs/:tokenA/:tokenB');
123+
const match = useMatch('/pools/:tokenA/:tokenB');
124124
useEffect(() => {
125125
if (match) {
126126
const foundTokenA = tokenList.find(
@@ -142,9 +142,9 @@ function Pairs() {
142142
const setTokensPath = useCallback(
143143
([tokenA, tokenB]: [Token?, Token?]) => {
144144
if (tokenA && tokenB) {
145-
navigate(`/pairs/${tokenA.symbol}/${tokenB.symbol}`);
145+
navigate(`/pools/${tokenA.symbol}/${tokenB.symbol}`);
146146
} else {
147-
navigate('/pairs');
147+
navigate('/pools');
148148
}
149149
},
150150
[navigate]
@@ -170,17 +170,17 @@ function Pairs() {
170170
return (
171171
<div className="pool-page col gap-5 mt-5">
172172
<div>
173-
<h1 className="h1">Pairs</h1>
173+
<h1 className="h1">Pools</h1>
174174
<div>Provide liquidity and earn fees.</div>
175175
</div>
176-
<Link to={`/pairs/${defaultTokenA}/${defaultTokenB}`}>
176+
<Link to={`/pools/${defaultTokenA}/${defaultTokenB}`}>
177177
<button className="button button-primary py-3 px-md">
178178
Create New Position
179179
</button>
180180
</Link>
181181
<PoolsTableCard
182182
className="flex mt-5"
183-
title="All Pairs"
183+
title="All Pools"
184184
switchValue={selectedPoolsList}
185185
switchOnChange={setSelectedPoolsList}
186186
onTokenPairClick={setTokensPath}
@@ -1096,8 +1096,8 @@ function Pair({
10961096
className={`chart-card col chart-type--${chartTypeSelected.toLowerCase()}`}
10971097
>
10981098
<div className="chart-breadcrumbs row flow-wrap gap-3 mb-5">
1099-
<Link className="text-light-alt" to="/pairs">
1100-
Pairs
1099+
<Link className="text-light-alt" to="/pools">
1100+
Pools
11011101
</Link>
11021102
{'>'}
11031103
<span>

0 commit comments

Comments
 (0)