2020-03-18 19:58:12 +00:00
|
|
|
import {parseDictionary} from './parsing-dictionary';
|
2020-03-19 18:12:06 +00:00
|
|
|
import getAudio from '../api/word-sound';
|
|
|
|
import {compoundWithYDictionary} from './get-translate';
|
2020-03-18 19:58:12 +00:00
|
|
|
|
2020-03-19 20:04:57 +00:00
|
|
|
export const createDictionary = async apiRes => {
|
2020-03-19 18:12:06 +00:00
|
|
|
const word = apiRes.word;
|
2020-03-18 19:58:12 +00:00
|
|
|
const parsedDictionary = parseDictionary(apiRes);
|
2020-03-19 20:04:57 +00:00
|
|
|
// const audio = await getAudio(word);
|
|
|
|
await compoundWithYDictionary(parsedDictionary, word);
|
2020-03-18 19:58:12 +00:00
|
|
|
};
|