From 7c67ce977e70fe0b92eddc5b17cd0a4913712a3c Mon Sep 17 00:00:00 2001 From: Ilya Y <75578537+ilya-bkv@users.noreply.github.com> Date: Thu, 21 Sep 2023 20:16:07 +0300 Subject: [PATCH] - fix body toggle classlist fixed (#229) - fix body toggle classlist fixed - change Feed settings link - fix youtube video match --- src/components/Article/FullArticle.tsx | 2 +- src/components/Feed/Sidebar/Sidebar.tsx | 2 +- src/components/_shared/VideoPlayer/VideoPlayer.tsx | 2 +- src/stores/ui.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Article/FullArticle.tsx b/src/components/Article/FullArticle.tsx index a2d03729..bcd49c2a 100644 --- a/src/components/Article/FullArticle.tsx +++ b/src/components/Article/FullArticle.tsx @@ -12,7 +12,6 @@ import { router, useRouter } from '../../stores/router' import { formatDate } from '../../utils' import { getDescription } from '../../utils/meta' import { imageProxy } from '../../utils/imageProxy' -import { isDesktop } from '../../utils/media-query' import { AuthorCard } from '../Author/AuthorCard' import { TableOfContents } from '../TableOfContents' import { AudioPlayer } from './AudioPlayer' @@ -61,6 +60,7 @@ export const FullArticle = (props: Props) => { }, 'bookmark') } + console.log('!!! props.article.media:', props.article.media) const body = createMemo(() => { if (props.article.layout === 'literature') { try { diff --git a/src/components/Feed/Sidebar/Sidebar.tsx b/src/components/Feed/Sidebar/Sidebar.tsx index 83f0a6dd..070c8c99 100644 --- a/src/components/Feed/Sidebar/Sidebar.tsx +++ b/src/components/Feed/Sidebar/Sidebar.tsx @@ -171,7 +171,7 @@ export const Sidebar = (props: FeedSidebarProps) => {
- + {t('Feed settings')} diff --git a/src/components/_shared/VideoPlayer/VideoPlayer.tsx b/src/components/_shared/VideoPlayer/VideoPlayer.tsx index 3ae84ba6..490fe443 100644 --- a/src/components/_shared/VideoPlayer/VideoPlayer.tsx +++ b/src/components/_shared/VideoPlayer/VideoPlayer.tsx @@ -25,7 +25,7 @@ export const VideoPlayer = (props: Props) => { setIsVimeo(!isYoutube) if (isYoutube) { if (props.videoUrl.includes('youtube.com')) { - const videoIdMatch = props.videoUrl.match(/v=(\w+)/) + const videoIdMatch = props.videoUrl.match(/watch=(\w+)/) setVideoId(videoIdMatch && videoIdMatch[1]) } else { const videoIdMatch = props.videoUrl.match(/youtu.be\/(\w+)/) diff --git a/src/stores/ui.ts b/src/stores/ui.ts index 55187e99..efaf8972 100644 --- a/src/stores/ui.ts +++ b/src/stores/ui.ts @@ -48,7 +48,7 @@ export const MODALS: Record = { following: 'following' } -const [modal, setModal] = createSignal() +const [modal, setModal] = createSignal(null) const [warnings, setWarnings] = createSignal([])