File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { useLatestVersion } from 'lib/hooks/api/latestVersion';
5
5
import { formatTimestamp } from 'lib/dateTimeHelpers' ;
6
6
7
7
import * as S from './Version.styled' ;
8
+ import { useTheme } from "styled-components" ;
8
9
9
10
const Version : React . FC = ( ) => {
10
11
const { data : latestVersionInfo = { } } = useLatestVersion ( ) ;
@@ -19,6 +20,13 @@ const Version: React.FC = () => {
19
20
20
21
return (
21
22
< S . Wrapper >
23
+ { isLatestRelease === null && (
24
+ < S . OutdatedWarning
25
+ title = { `Version check disabled.` }
26
+ >
27
+ < WarningIcon color = { useTheme ( ) . icons . infoIcon } />
28
+ </ S . OutdatedWarning >
29
+ ) }
22
30
{ isLatestRelease === false && (
23
31
< S . OutdatedWarning
24
32
title = { `Your app version is outdated. Latest version is ${
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import styled from 'styled-components' ;
2
+ import styled , { useTheme } from 'styled-components' ;
3
3
4
4
const WarningIconContainer = styled . span `
5
5
align-items: center;
@@ -9,7 +9,7 @@ const WarningIconContainer = styled.span`
9
9
width: 1.5rem;
10
10
` ;
11
11
12
- const WarningIcon : React . FC = ( ) => {
12
+ const WarningIcon : React . FC < { color ?: string } > = ( props ) => {
13
13
return (
14
14
< WarningIconContainer >
15
15
< svg
@@ -24,7 +24,7 @@ const WarningIcon: React.FC = () => {
24
24
fillRule = "evenodd"
25
25
clipRule = "evenodd"
26
26
d = "M8.09265 1.06679C7.60703 0.250524 6.39297 0.250524 5.90735 1.06679L0.170916 10.7089C-0.314707 11.5252 0.292322 12.5455 1.26357 12.5455H12.7364C13.7077 12.5455 14.3147 11.5252 13.8291 10.7089L8.09265 1.06679ZM6 5.00006C6 4.44778 6.44772 4.00006 7 4.00006C7.55228 4.00006 8 4.44778 8 5.00006V7.00006C8 7.55235 7.55228 8.00006 7 8.00006C6.44772 8.00006 6 7.55235 6 7.00006V5.00006ZM6 10.0001C6 9.44778 6.44772 9.00006 7 9.00006C7.55228 9.00006 8 9.44778 8 10.0001C8 10.5523 7.55228 11.0001 7 11.0001C6.44772 11.0001 6 10.5523 6 10.0001Z"
27
- fill = "#F2C94C"
27
+ fill = { props . color || useTheme ( ) . icons . warningIcon }
28
28
/>
29
29
</ svg >
30
30
</ WarningIconContainer >
You can’t perform that action at this time.
0 commit comments