I have a choice of object array languages that value and label. I use it for component antd Select. I would like to take and transfer another file and access it. How can this be implemented so that this array is not directly in the code.
import React, { useState } from 'react';
import { Button, Select, Modal } from 'antd';
import 'antd/dist/antd.css'
import './App.css';
function App() {
const listLanguages = [
{ value: "af", label: "Afrikaans" },
{ value: "sq", label: "Albanian - shqip" },
{ value: "am", label: "Amharic - አማርኛ" },
{ value: "ar", label: "Arabic - العربية" },
{ value: "an", label: "Aragonese - aragonés" },
{ value: "hy", label: "Armenian - հայերեն" },
{ value: "ast", label: "Asturian - asturianu" },
{ value: "az", label: "Azerbaijani - azərbaycan dili" },
{ value: "eu", label: "Basque - euskara" },
{ value: "be", label: "Belarusian - беларуская" },
{ value: "bn", label: "Bengali - বাংলা" },
{ value: "bs", label: "Bosnian - bosanski" },
{ value: "br", label: "Breton - brezhoneg" },
];
return (
<>
<Select
placeholder={"language"}
options={listLanguages}
></Select>
</>
);
}
export default App;