From 4f01d55a3cbb0c74d31b9b1edb327e828ba0e8a5 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Wed, 1 Mar 2023 17:08:04 +0000 Subject: [PATCH] Profile: Fix session table overflowing page layout in mobile (#63858) handle table overflowing in mobile layout --- public/app/features/profile/UserSessions.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/public/app/features/profile/UserSessions.tsx b/public/app/features/profile/UserSessions.tsx index 525b2702434..107d3c636ed 100644 --- a/public/app/features/profile/UserSessions.tsx +++ b/public/app/features/profile/UserSessions.tsx @@ -1,3 +1,4 @@ +import { css, cx } from '@emotion/css'; import { t } from 'i18next'; import React, { PureComponent } from 'react'; @@ -15,17 +16,18 @@ interface Props { class UserSessions extends PureComponent { render() { const { isLoading, sessions, revokeUserSession } = this.props; + const styles = getStyles(); if (isLoading) { return Loading sessions...} />; } return ( -
+
{sessions.length > 0 && ( <>

Sessions

-
+
@@ -76,4 +78,13 @@ class UserSessions extends PureComponent { } } +const getStyles = () => ({ + wrapper: css({ + maxWidth: '100%', + }), + table: css({ + overflow: 'auto', + }), +}); + export default UserSessions;