Skip to content

Commit 6687047

Browse files
committed
✨(frontend) fix format
2 parents 90adee2 + 6fc6e33 commit 6687047

File tree

3 files changed

+40
-36
lines changed

3 files changed

+40
-36
lines changed

frontend/src/app/Components/Layout/Components/HeaderLayout.jsx

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function HeaderLayout({
2121
profile,
2222
applications,
2323
redirectUrl,
24+
isAffixHeader = true,
2425
}) {
2526
const pathname = usePathname();
2627
const tHome = useTranslations("HomePage");
@@ -76,38 +77,38 @@ function HeaderLayout({
7677
},
7778
];
7879

79-
return (
80-
<Affix>
81-
<Header>
82-
<Flex>
83-
<div className="logo">
84-
<Link className="logo-txt" href="/">
85-
{tHome("title")}
80+
const header = (
81+
<Header>
82+
<Flex>
83+
<div className="logo">
84+
<Link className="logo-txt" href="/">
85+
{tHome("title")}
86+
</Link>
87+
</div>
88+
{applications && (
89+
<Menu
90+
theme="dark"
91+
mode="horizontal"
92+
selectedKeys={getSelectedKey()}
93+
items={menuItem(applications, tNav)}
94+
className="header-menu"
95+
/>
96+
)}
97+
{applications?.some(
98+
(value) => value?.id === "ai" && value?.enabled,
99+
) && <AiAssistant />}
100+
{!isProfile && (
101+
<Dropdown menu={{ items }}>
102+
<Link className="profile-link" href="/#">
103+
<Avatar icon={<UserOutlined />} /> {profile}
86104
</Link>
87-
</div>
88-
{applications && (
89-
<Menu
90-
theme="dark"
91-
mode="horizontal"
92-
selectedKeys={getSelectedKey()}
93-
items={menuItem(applications, tNav)}
94-
className="header-menu"
95-
/>
96-
)}
97-
{applications?.some(
98-
(value) => value?.id === "ai" && value?.enabled,
99-
) && <AiAssistant />}
100-
{!isProfile && (
101-
<Dropdown menu={{ items }}>
102-
<Link className="profile-link" href="/#">
103-
<Avatar icon={<UserOutlined />} /> {profile}
104-
</Link>
105-
</Dropdown>
106-
)}
107-
</Flex>
108-
</Header>
109-
</Affix>
105+
</Dropdown>
106+
)}
107+
</Flex>
108+
</Header>
110109
);
110+
111+
return isAffixHeader ? <Affix>{header}</Affix> : header;
111112
}
112113

113114
export default HeaderLayout;

frontend/src/app/Components/Layout/PageLayout.jsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ export default function PageLayout({ children }) {
3232
profile={data?.name}
3333
applications={appConfig?.applications}
3434
redirectUrl={appConfig?.redirect_to_account_page}
35+
isAffixHeader={!isEmbeddedAppRoute} // Affix header for embedded app routes
3536
/>
36-
<Content className="layout-content">
37+
<Content className={isEmbeddedAppRoute ? "" : "layout-content"}>
3738
<div className="content">
3839
{/* Render all embedded apps at once, show/hide based on route */}
3940
{embeddedApps.map((app) => {
@@ -75,10 +76,12 @@ export default function PageLayout({ children }) {
7576
tooltip={t("helpdesk")}
7677
/>
7778
)}
78-
<Footer>
79-
{t("copyright")}
80-
{new Date().getFullYear()}
81-
</Footer>
79+
{!isEmbeddedAppRoute && (
80+
<Footer>
81+
{t("copyright")}
82+
{new Date().getFullYear()}
83+
</Footer>
84+
)}
8285
</Layout>
8386
) : (
8487
<>{children}</>

frontend/src/app/globals.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ footer {
295295
/* -------------------------------------------------- */
296296
.external-app-container {
297297
width: 100%;
298-
height: calc(100vh - 64px);
298+
height: calc(100vh - 40px);
299299
position: relative;
300300
background-color: #fff;
301301
}

0 commit comments

Comments
 (0)