Update constants to use TypeScript

This commit is contained in:
Arnaud Vergnet 2020-09-22 15:19:54 +02:00
parent 5261e85254
commit 8ac19f36de
4 changed files with 19 additions and 21 deletions

View file

@ -19,12 +19,12 @@
// @flow // @flow
import ICON_AMICALE from '../../assets/amicale.png'; const ICON_AMICALE = require('../../assets/amicale.png');
import ICON_CAMPUS from '../../assets/android.icon.png'; const ICON_CAMPUS = require('../../assets/android.icon.png');
export type NewsSourceType = { export type NewsSourceType = {
icon: number, icon: number;
name: string, name: string;
}; };
export default { export default {

View file

@ -27,15 +27,15 @@ export default {
ERROR: 5, ERROR: 5,
UNKNOWN: 6, UNKNOWN: 6,
}, },
stateIcons: { stateIcons: [
0: 'radiobox-blank', 'radiobox-blank',
1: 'progress-check', 'progress-check',
2: 'alert-circle-outline', 'alert-circle-outline',
3: 'check-circle', 'check-circle',
4: 'alert-octagram-outline', 'alert-octagram-outline',
5: 'alert', 'alert',
6: 'help-circle-outline', 'help-circle-outline',
}, ],
washinsa: { washinsa: {
id: 'washinsa', id: 'washinsa',
title: 'screens.proxiwash.washinsa.title', title: 'screens.proxiwash.washinsa.title',

View file

@ -17,8 +17,6 @@
* along with Campus INSAT. If not, see <https://www.gnu.org/licenses/>. * along with Campus INSAT. If not, see <https://www.gnu.org/licenses/>.
*/ */
// @flow
import * as React from 'react'; import * as React from 'react';
import i18n from 'i18n-js'; import i18n from 'i18n-js';
import type {IntroSlideType} from '../components/Overrides/CustomIntroSlider'; import type {IntroSlideType} from '../components/Overrides/CustomIntroSlider';
@ -49,16 +47,16 @@ export default class Update {
this.updateSlides = [ this.updateSlides = [
{ {
key: '0', key: '0',
title: i18n.t(`intro.updateSlide0.title`), title: i18n.t('intro.updateSlide0.title'),
text: i18n.t(`intro.updateSlide0.text`), text: i18n.t('intro.updateSlide0.text'),
view: (): React.Node => <MascotIntroWelcome />, view: () => <MascotIntroWelcome />,
colors: ['#be1522', '#57080e'], colors: ['#be1522', '#57080e'],
}, },
{ {
key: '1', key: '1',
title: i18n.t(`intro.updateSlide1.title`), title: i18n.t('intro.updateSlide1.title'),
text: i18n.t(`intro.updateSlide1.text`), text: i18n.t('intro.updateSlide1.text'),
view: (): React.Node => <IntroIcon icon="account-heart-outline" />, view: () => <IntroIcon icon="account-heart-outline" />,
colors: ['#9c165b', '#3e042b'], colors: ['#9c165b', '#3e042b'],
}, },
]; ];