Fix header overflow on mobile viewports
SonarQube Analysis / sonarqube (push) Successful in 6m55s

This commit is contained in:
2026-08-13 17:51:15 -05:00
parent 921022c658
commit f5218782e9
3 changed files with 60 additions and 16 deletions
+8 -8
View File
@@ -1,5 +1,5 @@
import { useEffect, useState, useCallback } from 'react';
import { Layout, Typography, Switch, Space, Row, Col, Spin, Button, theme } from 'antd';
import { Layout, Typography, Switch, Row, Col, Spin, Button, theme } from 'antd';
import { Link } from 'react-router-dom';
import { Item, SiteConfig, fetchItems, fetchConfig } from './api';
import ItemCard from './components/ItemCard';
@@ -28,16 +28,16 @@ export default function App() {
return (
<Layout style={{ minHeight: '100vh' }}>
<Header
className="site-header"
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
background: token.colorBgContainer,
borderBottom: `1px solid ${token.colorBorderSecondary}`
}}
>
<Title level={3} style={{ color: token.colorText, margin: 0 }}>Redefined Designs</Title>
<Space>
<Title level={3} className="site-header-title" style={{ color: token.colorText }}>
Redefined Designs
</Title>
<div className="site-header-actions">
<Switch checked={mode === 'dark'} onChange={toggle} checkedChildren="Dark" unCheckedChildren="Light" />
{customer ? (
<Link to="/account"><Button>My Account</Button></Link>
@@ -47,7 +47,7 @@ export default function App() {
<Link to="/register"><Button type="primary">Sign up</Button></Link>
</>
)}
</Space>
</div>
</Header>
<Content style={{ padding: 24 }}>
{!config ? <Spin /> : (
@@ -65,4 +65,4 @@ export default function App() {
</Footer>
</Layout>
);
}
}