feature/improved-article-content-loading #179

Merged
danysmall merged 7 commits from feature/improved-article-content-loading into develop 2022-11-12 23:19:40 +00:00
Showing only changes of commit d755be1f95 - Show all commits

View File

@ -11,17 +11,16 @@ function useArticleViewModel(
) { ) {
const { id } = useParams(); const { id } = useParams();
// const getArticle = useCallback( const getArticle = useCallback(
// () => { (articleID: string) => {
// getArticleUseCase.call(id ?? '').catch((_) => fetchArticleUseCase.call(id ?? '')); getArticleUseCase.call(articleID).catch((_) => fetchArticleUseCase.call(articleID));
// console.log(id); },
// }, [id]
// [id] );
// );
useEffect(() => { useEffect(() => {
getArticleUseCase.call(id ?? '').catch((_) => fetchArticleUseCase.call(id ?? '')); getArticle(id ?? '');
}, []); }, [id]);
return { return {
article: store.currentArticle, article: store.currentArticle,