export const langMapDataA = { sports: "Sports", casino: "Casino", esports: "E-Sports", };
const reCraftArray = Object.keys(viewLang).map((key) => ({ key: key, value: viewLang[key], }));
const [list, setList] = useState(reCraftArray);
React.useEffect(() => { const reOrderSort = list.reduce((a, c) => { return a.concat(c.key); }, []); setProp((props) => (props.order = reOrderSort)); }, [list]); // 每次list有變化都再變成陣列一次,然後再傳給元件