Skip to content

Commit 81189f3

Browse files
authored
Merge pull request #2094 from oasisprotocol/csillag/fix-testnet-404-text-colors
Fix testnet 404 text colors
2 parents 127dc19 + 1410d51 commit 81189f3

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

.changelog/2094.bugfix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix 404 text color on testnet

src/app/components/EmptyState/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { styled } from '@mui/material/styles'
55
import lightBackgroundEmptyState from './images/background-empty-state.svg'
66
import darkBackgroundEmptyState from './images/background-empty-state-dark.svg'
77
import CancelIcon from '@mui/icons-material/Cancel'
8-
import { useTheme } from '@mui/material/styles'
98
import { COLORS } from '../../../styles/theme/colors'
109

1110
const StyledBox = styled(Box)(({ theme }) => ({
@@ -42,9 +41,8 @@ type EmptyStateProps = {
4241
}
4342

4443
export const EmptyState: FC<EmptyStateProps> = ({ description, title, light, minHeight = '360px' }) => {
45-
const theme = useTheme()
4644
const content = (
47-
<Box sx={{ color: light ? 'inherit' : theme.palette.layout.contrastMain, textAlign: 'center' }}>
45+
<Box sx={{ color: light ? 'inherit' : COLORS.white, textAlign: 'center' }}>
4846
<Typography component="span" sx={{ fontSize: '30px', fontWeight: 500, display: 'block' }}>
4947
{title}
5048
</Typography>

src/app/pages/SearchResultsPage/NoResults.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { Link as RouterLink } from 'react-router-dom'
66
import Link from '@mui/material/Link'
77
import { SearchSuggestionsLinksForNoResults } from '../../components/Search/SearchSuggestionsLinksForNoResults'
88
import { OptionalBreak } from '../../components/OptionalBreak'
9-
import { useTheme } from '@mui/material/styles'
109
import { getNameForScope, SearchScope } from '../../../types/searchScope'
1110
import { getNetworkNames, Network } from '../../../types/network'
1211
import { Layer } from '../../../oasis-nexus/api'
@@ -17,7 +16,6 @@ export const NoResults: FC<{
1716
layer?: Layer
1817
}> = ({ network, layer }) => {
1918
const { t } = useTranslation()
20-
const theme = useTheme()
2119
const title = network
2220
? t('search.noResults.scopeHeader', {
2321
scope: layer ? getNameForScope(t, { network, layer }) : getNetworkNames(t)[network],
@@ -28,12 +26,7 @@ export const NoResults: FC<{
2826
<EmptyState
2927
title={title}
3028
description={
31-
<Box
32-
sx={{
33-
textAlign: 'center',
34-
a: { color: theme.palette.layout.contrastMain, textDecoration: 'underline' },
35-
}}
36-
>
29+
<Box sx={{ a: { color: 'inherit', textDecoration: 'underline' } }}>
3730
<p>
3831
<Box>
3932
<Trans

0 commit comments

Comments
 (0)