Skip to content

Commit 1410d51

Browse files
lukaw3dcsillag
authored andcommitted
Provide different implementation
Set link color to "inherit" in NoResults; this makes it easier to set the color we want from EmptySpace. Instead of trying to configure the link color from EmptyState, just set it to inherid
1 parent 8b7da46 commit 1410d51

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

src/app/components/EmptyState/index.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,7 @@ type EmptyStateProps = {
4242

4343
export const EmptyState: FC<EmptyStateProps> = ({ description, title, light, minHeight = '360px' }) => {
4444
const content = (
45-
<Box
46-
sx={{
47-
...(light
48-
? { color: 'inherit' }
49-
: {
50-
color: COLORS.white,
51-
'& span a': { color: COLORS.white },
52-
}),
53-
textAlign: 'center',
54-
}}
55-
>
45+
<Box sx={{ color: light ? 'inherit' : COLORS.white, textAlign: 'center' }}>
5646
<Typography component="span" sx={{ fontSize: '30px', fontWeight: 500, display: 'block' }}>
5747
{title}
5848
</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)