Skip to content

Commit aaef35b

Browse files
committed
Update const names
Keeping it consistent with the used functions.
1 parent 9b2427c commit aaef35b

30 files changed

+101
-100
lines changed

src/components/ActionBar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const UnstyledActionBar = ({
7373

7474
const navigate = useNavigate()
7575

76-
const chainName = useCurrentChainKey()
76+
const chainKey = useCurrentChainKey()
7777

7878
return (
7979
<ActionBarContainer {...props}>
@@ -93,7 +93,7 @@ const UnstyledActionBar = ({
9393
<Tabs
9494
selection={scope}
9595
onSelectionChange={(id) => {
96-
navigate(R.projects(routeOptions(chainName, { tab: id })))
96+
navigate(R.projects(routeOptions(chainKey, { tab: id })))
9797
}}
9898
>
9999
<Tab id={TabOption.Any}>All projects</Tab>

src/components/ActionBars/AboutSponsorship.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface AboutSponsorshipProps {
2424
export function AboutSponsorship({ sponsorship }: AboutSponsorshipProps) {
2525
const { streamId } = sponsorship
2626

27-
const chainName = useCurrentChainKey()
27+
const chainKey = useCurrentChainKey()
2828

2929
return (
3030
<DefaultSimpleDropdownMenu>
@@ -35,7 +35,7 @@ export function AboutSponsorship({ sponsorship }: AboutSponsorshipProps) {
3535
<strong>{truncateStreamName(streamId)}</strong>
3636
<div>
3737
<Link
38-
to={R.stream(streamId, routeOptions(chainName))}
38+
to={R.stream(streamId, routeOptions(chainKey))}
3939
target="_blank"
4040
>
4141
<ExternalLinkIcon />

src/components/ActionBars/SponsorshipActionBar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ export function SponsorshipActionBar({ sponsorship }: SponsorshipActionBarProps)
7373

7474
const chainId = useCurrentChainId()
7575

76-
const chainName = useCurrentChainKey()
76+
const chainKey = useCurrentChainKey()
7777

7878
return (
7979
<AbstractActionBar
80-
fallbackBackButtonUrl={R.sponsorships(routeOptions(chainName))}
80+
fallbackBackButtonUrl={R.sponsorships(routeOptions(chainKey))}
8181
title={
8282
streamId ? (
8383
truncateStreamName(streamId, 30)

src/components/ChainSelector.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ const Menu = ({ chains, selectedChain, toggle }: MenuProps) => {
4545
onClick={() => {
4646
toggle(false)
4747

48-
const chainName = getChainKey(c.id)
48+
const chainKey = getChainKey(c.id)
4949

5050
setSearchParams((prev) => {
5151
const { chain: _, ...rest } = Object.fromEntries(prev)
5252

53-
return chainName === defaultChainKey
53+
return chainKey === defaultChainKey
5454
? rest
55-
: { ...rest, chain: chainName }
55+
: { ...rest, chain: chainKey }
5656
})
5757
}}
5858
/>

src/components/Footer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const FooterColumns = styled(UnstyledFooterColumns)`
3030
`
3131

3232
const Footer = ({ topBorder = false }) => {
33-
const chainName = useCurrentChainKey()
33+
const chainKey = useCurrentChainKey()
3434

3535
return (
3636
<LayoutFooter>
@@ -56,7 +56,7 @@ const Footer = ({ topBorder = false }) => {
5656
</FooterColumn>
5757
<FooterColumn title="Apps">
5858
<a href={R.networkExplorer()}>Network Explorer</a>
59-
<a href={R.hub(routeOptions(chainName))}>Hub</a>
59+
<a href={R.hub(routeOptions(chainKey))}>Hub</a>
6060
</FooterColumn>
6161
<FooterColumn title="Contact">
6262
<a href={R.contactGeneral()}>General</a>

src/components/Nav/NetworkAccordion.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function NetworkAccordion() {
1313

1414
const [isOpen, toggle] = useReducer((x) => !x, false)
1515

16-
const chainName = useCurrentChainKey()
16+
const chainKey = useCurrentChainKey()
1717

1818
return (
1919
<>
@@ -23,7 +23,7 @@ export function NetworkAccordion() {
2323
>
2424
<NavLink
2525
as={Link}
26-
to={R.networkOverview(routeOptions(chainName))}
26+
to={R.networkOverview(routeOptions(chainKey))}
2727
onClick={(e) => {
2828
e.preventDefault()
2929

@@ -47,7 +47,7 @@ export function NetworkAccordion() {
4747
return (
4848
<NetworkMobileLink
4949
{...rest}
50-
to={linkFn(routeOptions(chainName))}
50+
to={linkFn(routeOptions(chainKey))}
5151
key={title}
5252
>
5353
<NetworkNavElement>

src/components/Nav/NetworkDropdown.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function Dropdown() {
3939
}, 250)
4040
}
4141

42-
const chainName = useCurrentChainKey()
42+
const chainKey = useCurrentChainKey()
4343

4444
return (
4545
<NavbarLinkDesktop highlight={isOpen || isNetworkTabActive(pathname)}>
@@ -54,7 +54,7 @@ export function Dropdown() {
5454
<DropdownItem
5555
$active={pathname.startsWith(i.linkFn())}
5656
key={i.title}
57-
to={i.linkFn(routeOptions(chainName))}
57+
to={i.linkFn(routeOptions(chainKey))}
5858
onFocus={() => void show(toggle)}
5959
onClick={() => void hide(toggle, { immediately: true })}
6060
>
@@ -68,7 +68,7 @@ export function Dropdown() {
6868
{(toggle) => (
6969
<NavLink
7070
as={Link}
71-
to={R.networkOverview(routeOptions(chainName))}
71+
to={R.networkOverview(routeOptions(chainKey))}
7272
onFocus={() => void show(toggle)}
7373
onBlur={() => void hide(toggle)}
7474
onMouseEnter={() => void show(toggle)}

src/components/Nav/index.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const UnstyledDesktopNav: FunctionComponent = (props) => {
5555

5656
const chainId = useCurrentChainId()
5757

58-
const chainName = useCurrentChainKey()
58+
const chainKey = useCurrentChainKey()
5959

6060
return (
6161
<div {...props} data-testid={'desktop-nav'}>
@@ -70,14 +70,14 @@ const UnstyledDesktopNav: FunctionComponent = (props) => {
7070
<div />
7171
<NavbarItem>
7272
<NavbarLinkDesktop highlight={pathname.startsWith(R.projects())}>
73-
<NavLink as={Link} to={R.projects(routeOptions(chainName))}>
73+
<NavLink as={Link} to={R.projects(routeOptions(chainKey))}>
7474
Projects
7575
</NavLink>
7676
</NavbarLinkDesktop>
7777
</NavbarItem>
7878
<NavbarItem>
7979
<NavbarLinkDesktop highlight={pathname.startsWith(R.streams())}>
80-
<NavLink as={Link} to={R.streams(routeOptions(chainName))}>
80+
<NavLink as={Link} to={R.streams(routeOptions(chainKey))}>
8181
Streams
8282
</NavLink>
8383
</NavbarLinkDesktop>
@@ -137,7 +137,7 @@ const UnstyledDesktopNav: FunctionComponent = (props) => {
137137
navigate(
138138
R.operator(
139139
operator.id,
140-
routeOptions(chainName),
140+
routeOptions(chainKey),
141141
),
142142
)
143143
}}
@@ -201,7 +201,7 @@ const UnstyledMobileNav: FunctionComponent<{ className?: string }> = ({ classNam
201201

202202
const { pathname } = useLocation()
203203

204-
const chainName = useCurrentChainKey()
204+
const chainKey = useCurrentChainKey()
205205

206206
return (
207207
<NavOverlay className={className}>
@@ -225,12 +225,12 @@ const UnstyledMobileNav: FunctionComponent<{ className?: string }> = ({ classNam
225225
</UserInfoMobile>
226226
)}
227227
<NavbarLinkMobile highlight={pathname.startsWith(R.projects())}>
228-
<NavLink as={Link} to={R.projects(routeOptions(chainName))}>
228+
<NavLink as={Link} to={R.projects(routeOptions(chainKey))}>
229229
Projects
230230
</NavLink>
231231
</NavbarLinkMobile>
232232
<NavbarLinkMobile highlight={pathname.startsWith(R.streams())}>
233-
<NavLink as={Link} to={R.streams(routeOptions(chainName))}>
233+
<NavLink as={Link} to={R.streams(routeOptions(chainKey))}>
234234
Streams
235235
</NavLink>
236236
</NavbarLinkMobile>

src/components/QueriedSponsorshipsTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function QueriedSponsorshipsTable({
5353

5454
const chainId = useCurrentChainId()
5555

56-
const chainName = useCurrentChainKey()
56+
const chainKey = useCurrentChainKey()
5757

5858
const fundSponsorship = useFundSponsorshipCallback()
5959

@@ -223,7 +223,7 @@ export function QueriedSponsorshipsTable({
223223
noDataFirstLine={noDataFirstLine}
224224
noDataSecondLine={noDataSecondLine}
225225
linkMapper={(element) =>
226-
R.sponsorship(element.id, routeOptions(chainName))
226+
R.sponsorship(element.id, routeOptions(chainKey))
227227
}
228228
/>
229229
{query.hasNextPage && (

src/components/QueriedStreamsTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function QueriedStreamsTable({
4242

4343
const chainId = useCurrentChainId()
4444

45-
const chainName = useCurrentChainKey()
45+
const chainKey = useCurrentChainKey()
4646

4747
const indexerQueryErrored = query.isError && isIndexerColumn(chainId, orderBy)
4848

@@ -141,7 +141,7 @@ export function QueriedStreamsTable({
141141
valueMapper: ({ subscriberCount = '∞' }) => subscriberCount,
142142
},
143143
]}
144-
linkMapper={(element) => R.stream(element.id, routeOptions(chainName))}
144+
linkMapper={(element) => R.stream(element.id, routeOptions(chainKey))}
145145
/>
146146
{query.hasNextPage && (
147147
<LoadMoreButton

0 commit comments

Comments
 (0)