From 7bd9320d249559fc913a16061174f9c3165554bd Mon Sep 17 00:00:00 2001 From: Igor Lobanov Date: Fri, 25 Nov 2022 12:03:51 +0100 Subject: [PATCH] fixes --- src/components/Article/FullArticle.tsx | 4 -- src/components/Nav/ProfilePopup.tsx | 9 +++-- src/components/Pages/profile/ProfilePage.tsx | 39 ------------------- .../Pages/profile/ProfileSettingsPage.tsx | 8 ++-- src/components/Root.tsx | 4 +- src/context/session.tsx | 5 ++- src/stores/router.ts | 2 - 7 files changed, 14 insertions(+), 57 deletions(-) delete mode 100644 src/components/Pages/profile/ProfilePage.tsx diff --git a/src/components/Article/FullArticle.tsx b/src/components/Article/FullArticle.tsx index ecc3c51b..36d176e4 100644 --- a/src/components/Article/FullArticle.tsx +++ b/src/components/Article/FullArticle.tsx @@ -43,7 +43,6 @@ const formatDate = (date: Date) => { export const FullArticle = (props: ArticleProps) => { const { session } = useSession() const formattedDate = createMemo(() => formatDate(new Date(props.article.createdAt))) - const [isSharePopupVisible, setIsSharePopupVisible] = createSignal(false) const mainTopic = () => (props.article.topics?.find((topic) => topic?.slug === props.article.mainTopic)?.title || '').replace( @@ -127,9 +126,6 @@ export const FullArticle = (props: ArticleProps) => { {/**/}
{ - setIsSharePopupVisible(isVisible) - }} containerCssClass={stylesHeader.control} trigger={} /> diff --git a/src/components/Nav/ProfilePopup.tsx b/src/components/Nav/ProfilePopup.tsx index 895458d5..caef2d15 100644 --- a/src/components/Nav/ProfilePopup.tsx +++ b/src/components/Nav/ProfilePopup.tsx @@ -2,20 +2,23 @@ import { useSession } from '../../context/session' import type { PopupProps } from '../_shared/Popup' import { Popup } from '../_shared/Popup' import styles from '../_shared/Popup/Popup.module.scss' +import { getPagePath } from '@nanostores/router' +import { router } from '../../stores/router' type ProfilePopupProps = Omit export const ProfilePopup = (props: ProfilePopupProps) => { const { - session, + userSlug, actions: { signOut } } = useSession() return ( + {/*TODO: l10n*/}