import React, { useState } from 'react'; import { Mentions } from 'antd'; const MOCK_DATA = { '@': ['afc163', 'zombiej', 'yesmeck'], '#': ['1.0', '2.0', '3.0'], }; type PrefixType = keyof typeof MOCK_DATA; const App: React.FC = () => { const [prefix, setPrefix] = useState('@'); const onSearch = (_: string, newPrefix: PrefixType) => { setPrefix(newPrefix); }; return ( ({ key: value, value, label: value, }))} /> ); }; export default App;