Commit 54eb25f7 authored by isstuev's avatar isstuev

fix 5

parent 7e0a630c
import { Alert, Spinner, Text, Link, useColorModeValue } from '@chakra-ui/react'; import { Alert, Spinner, Text, Link, useColorModeValue, useTheme } from '@chakra-ui/react';
import { transparentize } from '@chakra-ui/theme-tools';
import React from 'react'; import React from 'react';
import useNewTxsSocket from 'lib/hooks/useNewTxsSocket'; import useNewTxsSocket from 'lib/hooks/useNewTxsSocket';
...@@ -33,13 +34,14 @@ const LatestTxsNotice = ({ className }: Props) => { ...@@ -33,13 +34,14 @@ const LatestTxsNotice = ({ className }: Props) => {
); );
} }
const theme = useTheme();
return ( return (
<Alert <Alert
className={ className } className={ className }
status="warning" status="warning"
p={ 4 } p={ 4 }
fontWeight={ 400 } fontWeight={ 400 }
bgColor={ useColorModeValue('orange.50', 'rgba(251, 211, 141, 0.16)') } bgColor={ useColorModeValue('orange.50', transparentize('orange.200', 0.16)(theme)) }
borderBottomRadius={ 0 } borderBottomRadius={ 0 }
> >
{ content } { content }
......
...@@ -39,9 +39,9 @@ const Page = ({ ...@@ -39,9 +39,9 @@ const Page = ({
const renderErrorScreen = React.useCallback(() => { const renderErrorScreen = React.useCallback(() => {
return wrapChildren ? return wrapChildren ?
<PageContent><AppError statusCode={ 500 } mt="50px"/></PageContent> : <PageContent hasSearch={ hasSearch }><AppError statusCode={ 500 } mt="50px"/></PageContent> :
<AppError statusCode={ 500 }/>; <AppError statusCode={ 500 }/>;
}, [ wrapChildren ]); }, [ wrapChildren, hasSearch ]);
const renderedChildren = wrapChildren ? ( const renderedChildren = wrapChildren ? (
<PageContent hasSearch={ hasSearch }>{ children }</PageContent> <PageContent hasSearch={ hasSearch }>{ children }</PageContent>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment