From 72977d88b65012bdeacf58f2ec44462d4a62716d Mon Sep 17 00:00:00 2001 From: teodorus-nathaniel Date: Tue, 5 Mar 2024 22:15:50 +0700 Subject: [PATCH] Add from url in sign in href --- src/components/auth/AuthorizationPanel.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/auth/AuthorizationPanel.tsx b/src/components/auth/AuthorizationPanel.tsx index 7cf4cef6b..9d558bfa5 100644 --- a/src/components/auth/AuthorizationPanel.tsx +++ b/src/components/auth/AuthorizationPanel.tsx @@ -1,9 +1,17 @@ import { Button } from 'antd' +import { getCurrentUrlOrigin } from 'src/utils/url' +import urlJoin from 'src/utils/url-join' import { NotificationsBell, useNotifCounterContext } from '../activity/NotifCounter' import { NewPostButtonInTopMenu } from '../posts/NewPostButtonInTopMenu' import { MyAccountPopup } from '../profiles/address-views' +import { isServerSide } from '../utils' import { useMyAddress } from './MyAccountsContext' +function getCurrentPathanme() { + if (isServerSide()) return '' + return encodeURIComponent(window.location.href.replace(getCurrentUrlOrigin(), '')) +} + export const AuthorizationPanel = () => { const address = useMyAddress() const { unreadCount } = useNotifCounterContext() @@ -17,7 +25,7 @@ export const AuthorizationPanel = () => { ) : ( - + )}