mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-04 11:33:07 +00:00
chore(ui): rename confirm logout variables (#23466)
This commit is contained in:
parent
3176b96c13
commit
70c39246f8
@ -39,7 +39,8 @@ const LeftSidebar = () => {
|
|||||||
const location = useCustomLocation();
|
const location = useCustomLocation();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { onLogoutHandler } = useAuthProvider();
|
const { onLogoutHandler } = useAuthProvider();
|
||||||
const [showConfirmLogoutModal, setShowConfirmLogoutModal] = useState(false);
|
const [isConfirmLogoutModalOpen, setIsConfirmLogoutModalOpen] =
|
||||||
|
useState(false);
|
||||||
const {
|
const {
|
||||||
preferences: { isSidebarCollapsed },
|
preferences: { isSidebarCollapsed },
|
||||||
} = useCurrentUserPreferences();
|
} = useCurrentUserPreferences();
|
||||||
@ -65,11 +66,11 @@ const LeftSidebar = () => {
|
|||||||
}, [location.pathname]);
|
}, [location.pathname]);
|
||||||
|
|
||||||
const handleLogoutClick = useCallback(() => {
|
const handleLogoutClick = useCallback(() => {
|
||||||
setShowConfirmLogoutModal(true);
|
setIsConfirmLogoutModalOpen(true);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const hideConfirmationModal = () => {
|
const hideConfirmLogoutModal = () => {
|
||||||
setShowConfirmLogoutModal(false);
|
setIsConfirmLogoutModalOpen(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const LOWER_SIDEBAR_TOP_SIDEBAR_MENU_ITEMS: MenuProps['items'] = useMemo(
|
const LOWER_SIDEBAR_TOP_SIDEBAR_MENU_ITEMS: MenuProps['items'] = useMemo(
|
||||||
@ -187,23 +188,23 @@ const LeftSidebar = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{showConfirmLogoutModal && (
|
{isConfirmLogoutModalOpen && (
|
||||||
<Modal
|
<Modal
|
||||||
centered
|
centered
|
||||||
bodyStyle={{ textAlign: 'center' }}
|
bodyStyle={{ textAlign: 'center' }}
|
||||||
closable={false}
|
closable={false}
|
||||||
closeIcon={null}
|
closeIcon={null}
|
||||||
footer={null}
|
footer={null}
|
||||||
open={showConfirmLogoutModal}
|
open={isConfirmLogoutModalOpen}
|
||||||
width={360}
|
width={360}
|
||||||
onCancel={hideConfirmationModal}>
|
onCancel={hideConfirmLogoutModal}>
|
||||||
<Typography.Title level={5}>{t('label.logout')}</Typography.Title>
|
<Typography.Title level={5}>{t('label.logout')}</Typography.Title>
|
||||||
<Typography.Text className="text-grey-muted">
|
<Typography.Text className="text-grey-muted">
|
||||||
{t('message.logout-confirmation')}
|
{t('message.logout-confirmation')}
|
||||||
</Typography.Text>
|
</Typography.Text>
|
||||||
|
|
||||||
<div className="d-flex gap-2 w-full m-t-md justify-center">
|
<div className="d-flex gap-2 w-full m-t-md justify-center">
|
||||||
<Button className="confirm-btn" onClick={hideConfirmationModal}>
|
<Button className="confirm-btn" onClick={hideConfirmLogoutModal}>
|
||||||
{t('label.cancel')}
|
{t('label.cancel')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user