File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33## [ Unreleased]
44
5+ ### Added
6+
7+ - Test label in the login view int he test environment
8+
59### Changed
610
711- Hide create event button when project does not allow loose events
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { useTranslate } from 'react-admin' ;
33
4- import Config from '../../../domain/config' ;
5- import styles from './appTitle.module.css' ;
4+ import IsTestEnvironmentLabel from '../isTestEnvironmentLabel/IsTestEnvironmentLabel' ;
65
76const AppTitle = ( ) => {
87 const translate = useTranslate ( ) ;
98
10- const isTestEnvironment = Config . IS_TEST_ENVIRONMENT ;
11- const testEnvironmentString = ` ${ translate ( 'application.test' ) } ` ;
12-
139 return (
1410 < >
1511 { translate ( 'dashboard.title' ) }
16- { isTestEnvironment && (
17- < span className = { styles . uppercase } > { testEnvironmentString } </ span >
18- ) }
12+ < IsTestEnvironmentLabel />
1913 </ >
2014 ) ;
2115} ;
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import { useTranslate } from 'react-admin' ;
3+
4+ import Config from '../../../domain/config' ;
5+ import styles from './isTestEnvironmentLabel.module.css' ;
6+
7+ const IsTestEnvironmentLabel = ( ) => {
8+ const translate = useTranslate ( ) ;
9+
10+ const isTestEnvironment = Config . IS_TEST_ENVIRONMENT ;
11+ const testEnvironmentString = ` ${ translate ( 'application.test' ) } ` ;
12+
13+ return isTestEnvironment ? (
14+ < span className = { styles . uppercase } > { testEnvironmentString } </ span >
15+ ) : null ;
16+ } ;
17+
18+ export default IsTestEnvironmentLabel ;
File renamed without changes.
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { makeStyles } from '@material-ui/core/styles';
66import { RouteComponentProps , StaticContext } from 'react-router' ;
77
88import theme from '../../common/materialUI/themeConfig' ;
9+ import IsTestEnvironmentLabel from '../../common/components/isTestEnvironmentLabel/IsTestEnvironmentLabel' ;
910
1011const useStyles = makeStyles ( {
1112 container : {
@@ -45,7 +46,10 @@ const LoginPage = ({ location }: Props) => {
4546 < Card >
4647 < CardContent >
4748 < div className = { classes . container } >
48- < p > { translate ( 'dashboard.title' ) } </ p >
49+ < p >
50+ { translate ( 'dashboard.title' ) }
51+ < IsTestEnvironmentLabel />
52+ </ p >
4953 < Button
5054 className = { classes . button }
5155 variant = "contained"
You can’t perform that action at this time.
0 commit comments