Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-md committed Oct 8, 2024
1 parent 8ebabac commit e27fcc7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
13 changes: 1 addition & 12 deletions components/SupportedNetworks/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const apiServices = (
): Array<{ name: string; link: string }> => [
{
name: 'Safe{Core} SDK',
link: 'http://localhost:3000/sdk/overview'
link: '/sdk/overview'
},
{
name: 'Safe{Wallet}',
Expand Down Expand Up @@ -58,17 +58,6 @@ export const curatedBlockExplorers = [
'https://sepolia.basescan.org'
]

export const shortNametoTxService = (shortName: string): string => {
switch (shortName) {
case 'eth':
return 'mainnet'
case 'oeth':
return 'optimism'
default:
return shortName
}
}

// export const shortNameToIcon = (shortName: string): string => {
// if (shortNameToIconName(shortName) == null) return '/unknown-logo.png'
// if (shortNameToIconName(shortName)?.endsWith('.jpg') === true) {
Expand Down
6 changes: 4 additions & 2 deletions lib/mdx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export const useCurrentTocIndex: (
}
}
if (active != null) {
const nextHeading = _headings[_headings.indexOf(active) + 1]
const nextHeading = _headings[_headings.indexOf(active as Heading) + 1]
const nextHeadingNode = document.getElementById(
nextHeading?.link.slice(1) ?? ''
)
Expand All @@ -166,7 +166,9 @@ export const useCurrentTocIndex: (
nextHeadingNode.offsetTop - navHeight <
document.documentElement.scrollTop + window.innerHeight
setCurrentIndex(
isNextHeadingInView ? (nextHeading?.link ?? '') : (active?.link ?? '')
(isNextHeadingInView
? (nextHeading?.link ?? '')
: (active?.link ?? '')) as string
)
} else setCurrentIndex(_headings[0]?.children?.[0]?.link ?? '')
}, [headings, navHeight])
Expand Down

0 comments on commit e27fcc7

Please sign in to comment.