@@ -3,11 +3,13 @@ import styled from "styled-components";
33import { useSortitionModulePhase } from "hooks/contracts/generated" ;
44import { useToggleTheme } from "hooks/useToggleThemeContext" ;
55import { GIT_BRANCH , GIT_DIRTY , GIT_HASH , GIT_TAGS , GIT_URL , RELEASE_VERSION } from "consts/index" ;
6+ import { isUndefined } from "utils/index" ;
67
78const Container = styled . div `
89 display: flex;
910 flex-direction: column;
1011 gap: 12px;
12+ padding: 0px 3px;
1113
1214 label,
1315 a {
@@ -22,26 +24,30 @@ const StyledIframe = styled.iframe`
2224 border: none;
2325 width: 100%;
2426 height: 30px;
25- border-radius: 300px;
27+ border-radius: 3px;
28+ ` ;
29+
30+ const StyledLabel = styled . label `
31+ padding-left: 8px;
2632` ;
2733
2834const Version = ( ) => (
29- < label >
35+ < StyledLabel >
3036 v{ RELEASE_VERSION } { " " }
3137 < a href = { GIT_URL } target = "_blank" rel = "noreferrer" >
3238 #{ GIT_HASH }
3339 </ a >
3440 { GIT_BRANCH && GIT_BRANCH !== "HEAD" && ` ${ GIT_BRANCH } ` }
3541 { GIT_TAGS && ` ${ GIT_TAGS } ` }
3642 { GIT_DIRTY && ` dirty` }
37- </ label >
43+ </ StyledLabel >
3844) ;
3945
4046const ServicesStatus = ( ) => {
4147 const [ theme ] = useToggleTheme ( ) ;
4248 const statusUrlParameters = useMemo ( ( ) => ( theme === "light" ? "?theme=light" : "?theme=dark" ) , [ theme ] ) ;
4349 const statusUrl = process . env . REACT_APP_STATUS_URL ;
44- return < label > { statusUrl && < StyledIframe src = { `${ statusUrl + statusUrlParameters } ` } /> } </ label > ;
50+ return < label > { isUndefined ( statusUrl ) ? null : < StyledIframe src = { `${ statusUrl + statusUrlParameters } ` } /> } </ label > ;
4551} ;
4652
4753enum Phases {
@@ -54,7 +60,7 @@ const Phase = () => {
5460 const { data : phase } = useSortitionModulePhase ( {
5561 watch : true ,
5662 } ) ;
57- return < > { phase !== undefined && < label > Phase: { Phases [ phase ] } </ label > } </ > ;
63+ return < > { isUndefined ( phase ) ? null : < StyledLabel > Phase: { Phases [ phase ] } </ StyledLabel > } </ > ;
5864} ;
5965
6066const Debug : React . FC = ( ) => {
0 commit comments