File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import WarningIcon from 'components/common/Icons/WarningIcon';
3
3
import { gitCommitPath } from 'lib/paths' ;
4
4
import { useLatestVersion } from 'lib/hooks/api/latestVersion' ;
5
5
import { formatTimestamp } from 'lib/dateTimeHelpers' ;
6
+ import { useTheme } from 'styled-components' ;
6
7
7
8
import * as S from './Version.styled' ;
8
9
@@ -17,8 +18,15 @@ const Version: React.FC = () => {
17
18
? versionTag
18
19
: formatTimestamp ( buildTime ) ;
19
20
21
+ const theme = useTheme ( ) ;
22
+
20
23
return (
21
24
< S . Wrapper >
25
+ { isLatestRelease === null && (
26
+ < S . OutdatedWarning title = "Version check disabled." >
27
+ < WarningIcon color = { theme . 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,8 @@ 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 } > = ( { color } ) => {
13
+ const theme = useTheme ( ) ;
13
14
return (
14
15
< WarningIconContainer >
15
16
< svg
@@ -24,7 +25,7 @@ const WarningIcon: React.FC = () => {
24
25
fillRule = "evenodd"
25
26
clipRule = "evenodd"
26
27
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"
28
+ fill = { color || theme . icons . warningIcon }
28
29
/>
29
30
</ svg >
30
31
</ WarningIconContainer >
You can’t perform that action at this time.
0 commit comments