@@ -2,6 +2,7 @@ import Page from '#components/Page';
22import Container from '#components/Container' ;
33import Link from '#components/Link' ;
44import useTranslation from '#hooks/useTranslation' ;
5+ import { useRequest } from '#utils/restRequest' ;
56import { resolveToComponent } from '#utils/translation' ;
67
78import arcLogo from '#assets/icons/arc_logo.png' ;
@@ -22,38 +23,12 @@ import VideoList from './VideoList';
2223import i18n from './i18n.json' ;
2324import styles from './styles.module.css' ;
2425
25- // FIXME: region names can be used from the enum context
26- const contacts = [
27- {
28- 29- name : 'Elly NANDASABA MULAHA' ,
30- extent : 'Africa Region' ,
31- } ,
32- {
33- 34- name : 'Luis FANOVICH' ,
35- extent : 'America Region' ,
36- } ,
37- {
38- 39- name : 'Dedi JUNADI' ,
40- extent : 'Asia Pacific Region' ,
41- } ,
42- {
43- 44- name : 'Anssi ANONEN' ,
45- extent : 'Europe Region' ,
46- } ,
47- {
48- 49- name : 'Ahmad AL JAMAL' ,
50- extent : 'MENA Region' ,
51- } ,
52- ] ;
53-
5426// eslint-disable-next-line import/prefer-default-export
5527export function Component ( ) {
5628 const strings = useTranslation ( i18n ) ;
29+ const { response : contactsResponse } = useRequest ( {
30+ url : '/api/v2/main_contact/' ,
31+ } ) ;
5732
5833 const contactDescription = resolveToComponent (
5934 strings . aboutFurtherInfo ,
@@ -266,7 +241,7 @@ export function Component() {
266241 headerDescription = { contactDescription }
267242 childrenContainerClassName = { styles . contactsList }
268243 >
269- { contacts . map ( ( contact ) => (
244+ { contactsResponse ?. results ? .map ( ( contact ) => (
270245 < div
271246 className = { styles . contact }
272247 key = { contact . extent }
0 commit comments