2024-11-28 17:23:53 +00:00
|
|
|
"use client";
|
2024-11-26 03:09:48 +00:00
|
|
|
import React from "react";
|
|
|
|
|
import DashCodeLogo from "./dascode-logo";
|
2024-11-28 17:23:53 +00:00
|
|
|
import { Link } from "@/i18n/routing";
|
2024-11-26 03:09:48 +00:00
|
|
|
import { useConfig } from "@/hooks/use-config";
|
|
|
|
|
import { useMenuHoverConfig } from "@/hooks/use-menu-hover";
|
|
|
|
|
import { useMediaQuery } from "@/hooks/use-media-query";
|
|
|
|
|
|
|
|
|
|
const Logo = () => {
|
2024-11-28 17:23:53 +00:00
|
|
|
const [config] = useConfig();
|
|
|
|
|
const [hoverConfig] = useMenuHoverConfig();
|
|
|
|
|
const { hovered } = hoverConfig;
|
|
|
|
|
const isDesktop = useMediaQuery("(min-width: 1280px)");
|
2024-11-26 03:09:48 +00:00
|
|
|
|
2024-11-28 17:23:53 +00:00
|
|
|
if (config.sidebar === "compact") {
|
2024-11-26 03:09:48 +00:00
|
|
|
return (
|
2024-11-28 17:23:53 +00:00
|
|
|
<Link
|
|
|
|
|
href="/dashboard/analytics"
|
|
|
|
|
className="flex gap-2 items-center justify-center "
|
|
|
|
|
>
|
|
|
|
|
<DashCodeLogo className=" text-default-900 h-8 w-8 [&>path:nth-child(3)]:text-background [&>path:nth-child(2)]:text-background" />
|
|
|
|
|
</Link>
|
2024-11-26 03:09:48 +00:00
|
|
|
);
|
2024-11-28 17:23:53 +00:00
|
|
|
}
|
|
|
|
|
if (config.sidebar === "two-column" || !isDesktop) return null;
|
|
|
|
|
|
|
|
|
|
return (
|
2024-12-07 16:32:39 +00:00
|
|
|
<Link href="/" className="flex items-center">
|
2024-11-28 17:23:53 +00:00
|
|
|
{/* <DashCodeLogo className=" text-default-900 h-8 w-8 [&>path:nth-child(3)]:text-background [&>path:nth-child(2)]:text-background" />
|
|
|
|
|
{(!config?.collapsed || hovered) && (
|
|
|
|
|
<h1 className="text-xl font-semibold text-default-900 ">D</h1>
|
|
|
|
|
)} */}
|
2025-01-12 15:19:27 +00:00
|
|
|
<img
|
|
|
|
|
className="w-100"
|
|
|
|
|
src="/../images/all-img/mediahub-logo.png"
|
|
|
|
|
alt="logo"
|
|
|
|
|
width={150}
|
|
|
|
|
/>
|
2024-11-28 17:23:53 +00:00
|
|
|
</Link>
|
|
|
|
|
);
|
2024-11-26 03:09:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default Logo;
|