mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: menu changes
This commit is contained in:
parent
69c930b67b
commit
83ec13bdcc
3 changed files with 31 additions and 33 deletions
|
|
@ -2,12 +2,11 @@ import "@styles/globals.css";
|
||||||
import { Menu } from "@components/Objects/Menu/Menu";
|
import { Menu } from "@components/Objects/Menu/Menu";
|
||||||
import AuthProvider from "@components/Security/AuthProvider";
|
import AuthProvider from "@components/Security/AuthProvider";
|
||||||
|
|
||||||
export default async function RootLayout({ children, params }: { children: React.ReactNode , params:any}) {
|
export default async function RootLayout({ children, params }: { children: React.ReactNode , params :any}) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AuthProvider>
|
<AuthProvider>
|
||||||
<Menu orgslug={params.orgslug}></Menu>
|
<Menu orgslug={params?.orgslug}></Menu>
|
||||||
{children}
|
{children}
|
||||||
</AuthProvider>
|
</AuthProvider>
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
'use client';
|
'use client';
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import useSWR from "swr";
|
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { getAPIUrl, getBackendUrl, getUriWithOrg } from "@services/config/config";
|
import { getUriWithOrg } from "@services/config/config";
|
||||||
import { getOrganizationContextInfo } from "@services/organizations/orgs";
|
import { getOrganizationContextInfo } from "@services/organizations/orgs";
|
||||||
import ClientComponentSkeleton from "@components/Utils/ClientComp";
|
import ClientComponentSkeleton from "@components/Utils/ClientComp";
|
||||||
import { HeaderProfileBox } from "@components/Security/HeaderProfileBox";
|
import { HeaderProfileBox } from "@components/Security/HeaderProfileBox";
|
||||||
import { swrFetcher } from "@services/utils/ts/requests";
|
|
||||||
import MenuLinks from "./MenuLinks";
|
import MenuLinks from "./MenuLinks";
|
||||||
import { getOrgLogoMediaDirectory } from "@services/media/media";
|
import { getOrgLogoMediaDirectory } from "@services/media/media";
|
||||||
|
|
||||||
|
|
@ -23,33 +21,35 @@ export const Menu = async (props: any) => {
|
||||||
}}></div>
|
}}></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className="backdrop-blur-lg bg-white/90 fixed flex top-0 left-0 right-0 h-[60px] ring-1 ring-inset ring-gray-500/10 items-center px-16 space-x-5 shadow-[0px_4px_16px_rgba(0,0,0,0.03)] z-50">
|
<div className="backdrop-blur-lg bg-white/90 fixed flex top-0 left-0 right-0 h-[60px] ring-1 ring-inset ring-gray-500/10 items-center space-x-5 shadow-[0px_4px_16px_rgba(0,0,0,0.03)] z-50">
|
||||||
<div className="logo flex ">
|
<div className="flex items-center space-x-5 w-full max-w-screen-2xl mx-auto px-16">
|
||||||
<Link href={getUriWithOrg(orgslug, "/")}>
|
<div className="logo flex ">
|
||||||
<div className="flex w-auto h-9 rounded-md items-center m-auto py-1 justify-center" >
|
<Link href={getUriWithOrg(orgslug, "/")}>
|
||||||
{org?.logo ? (
|
<div className="flex w-auto h-9 rounded-md items-center m-auto py-1 justify-center" >
|
||||||
<img
|
{org?.logo ? (
|
||||||
src={`${getOrgLogoMediaDirectory(org.org_id, org?.logo)}`}
|
<img
|
||||||
alt="Learnhouse"
|
src={`${getOrgLogoMediaDirectory(org.org_id, org?.logo)}`}
|
||||||
style={{ width: "auto", height: "100%" }}
|
alt="Learnhouse"
|
||||||
className="rounded-md"
|
style={{ width: "auto", height: "100%" }}
|
||||||
/>
|
className="rounded-md"
|
||||||
) : (
|
/>
|
||||||
<LearnHouseLogo></LearnHouseLogo>
|
) : (
|
||||||
)}
|
<LearnHouseLogo></LearnHouseLogo>
|
||||||
</div>
|
)}
|
||||||
</Link>
|
</div>
|
||||||
</div>
|
</Link>
|
||||||
<div className="links flex grow">
|
</div>
|
||||||
<ClientComponentSkeleton>
|
<div className="links flex grow">
|
||||||
<MenuLinks orgslug={orgslug} />
|
<ClientComponentSkeleton>
|
||||||
</ClientComponentSkeleton>
|
<MenuLinks orgslug={orgslug} />
|
||||||
|
</ClientComponentSkeleton>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className="profile flex">
|
<div className="profile flex">
|
||||||
<ClientComponentSkeleton>
|
<ClientComponentSkeleton>
|
||||||
<HeaderProfileBox />
|
<HeaderProfileBox />
|
||||||
</ClientComponentSkeleton>
|
</ClientComponentSkeleton>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,6 @@ export const HeaderProfileBox = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const AccountArea = styled.div`
|
const AccountArea = styled.div`
|
||||||
padding-right: 20px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
place-items: center;
|
place-items: center;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue