File tree Expand file tree Collapse file tree 3 files changed +16
-15
lines changed
Expand file tree Collapse file tree 3 files changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,12 @@ import {LogBox} from 'react-native';
1414LogBox . ignoreAllLogs ( ) ;
1515
1616const NavigationTheme = {
17- ... DefaultTheme ,
17+ dark : true ,
1818 colors : {
1919 ...DefaultTheme . colors ,
2020 card : theme . colors . background ,
2121 text : theme . colors . text ,
22+ background : theme . colors . background ,
2223 } ,
2324} ;
2425
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {Button} from 'native-base';
1212import { TextMl } from './Textml' ;
1313import { InAppBrowser } from 'react-native-inappbrowser-reborn' ;
1414import { theme } from '../theme' ;
15+ import { Config } from '../config' ;
1516
1617type Props = {
1718 generalData : any ;
@@ -77,10 +78,7 @@ export function Medocomponent(props: Props) {
7778 < Button
7879 style = { styles . button }
7980 onPress = { ( ) => {
80- onPress (
81- 'http://m.base-donnees-publique.medicaments.gouv.fr/#!info-' +
82- item . cis ,
83- ) ;
81+ onPress ( Config . baseUrl . informations ( item . cis ) ) ;
8482 } } >
8583 < Text style = { styles . textButton } > Informations</ Text >
8684 </ Button >
@@ -92,22 +90,14 @@ export function Medocomponent(props: Props) {
9290 } ,
9391 ] ) }
9492 onPress = { ( ) => {
95- onPress (
96- 'http://m.base-donnees-publique.medicaments.gouv.fr/#!rcp-' +
97- item . cis +
98- '-0' ,
99- ) ;
93+ onPress ( Config . baseUrl . characteristics ( item . cis ) ) ;
10094 } } >
10195 < Text style = { styles . textButton } > Caractéristiques</ Text >
10296 </ Button >
10397 < Button
10498 style = { styles . button }
10599 onPress = { ( ) => {
106- onPress (
107- 'http://m.base-donnees-publique.medicaments.gouv.fr/#!notice-' +
108- item . cis +
109- '-0' ,
110- ) ;
100+ onPress ( Config . baseUrl . notice ( item . cis ) ) ;
111101 } } >
112102 < Text style = { styles . textButton } > Notice</ Text >
113103 </ Button >
Original file line number Diff line number Diff line change @@ -16,6 +16,16 @@ export enum StorageKey {
1616}
1717
1818export const Config = {
19+ baseUrl : {
20+ informations : ( v : string ) =>
21+ 'https://m.base-donnees-publique.medicaments.gouv.fr/#!info-' + v ,
22+ characteristics : ( v : string ) =>
23+ 'https://m.base-donnees-publique.medicaments.gouv.fr/#!rcp-' + v + '-0' ,
24+ notice : ( v : string ) =>
25+ 'https://m.base-donnees-publique.medicaments.gouv.fr/#!notice-' +
26+ v +
27+ '-0' ,
28+ } ,
1929 downloadUrl : [
2030 {
2131 url : 'https://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier=CIS_bdpm.txt' ,
You can’t perform that action at this time.
0 commit comments