diff --git a/src/components/flow/Cell/styles.scss b/src/components/flow/Cell/styles.scss index 539ab88c..b57eef2b 100644 --- a/src/components/flow/Cell/styles.scss +++ b/src/components/flow/Cell/styles.scss @@ -55,6 +55,7 @@ overflow: hidden; box-sizing: border-box; + word-break: break-word; } .title { diff --git a/src/utils/dom.ts b/src/utils/dom.ts index e52f98cc..62a4a020 100644 --- a/src/utils/dom.ts +++ b/src/utils/dom.ts @@ -1,6 +1,7 @@ import { IFile } from '~/redux/types'; import formatDistanceToNow from 'date-fns/formatDistanceToNow'; import { ru } from 'date-fns/locale'; +import Axios from 'axios'; export const getStyle = (oElm: any, strCssRule: string) => { if (document.defaultView && document.defaultView.getComputedStyle) { @@ -90,9 +91,15 @@ export const formatCommentText = (author: string, text: string): string => text ? formatText(text).replace( /^
/, - author ? `
${author}:
` : '' + author ? `
${author}: ` : '
'
)
: '';
export const getPrettyDate = (date: string): string =>
formatDistanceToNow(new Date(date), { locale: ru, includeSeconds: true, addSuffix: true });
+
+export const getYoutubeTitle = async (id: string) => {
+ Axios.get(`http://youtube.com/get_video_info?video_id=${id}`).then(console.log);
+};
+
+(