import {useEffect} from 'react'; import styled from '@emotion/styled'; import {logout} from 'sentry/actionCreators/account'; import {IconSentry} from 'sentry/icons'; import {t} from 'sentry/locale'; import useApi from 'sentry/utils/useApi'; type Props = { children: React.ReactNode; maxWidth?: string; showLogout?: boolean; }; function NarrowLayout({maxWidth, showLogout, children}: Props) { const api = useApi(); useEffect(() => { document.body.classList.add('narrow'); return () => document.body.classList.remove('narrow'); }, []); async function handleLogout() { await logout(api); window.location.assign('/auth/login'); } return (