mediahub-fe/components/partials/header/header-logo.tsx

37 lines
914 B
TypeScript
Raw Normal View History

2024-11-28 17:23:53 +00:00
"use client";
import React from "react";
import { Link } from "@/components/navigation";
import DashCodeLogo from "@/components/dascode-logo";
import { useConfig } from "@/hooks/use-config";
import { useMediaQuery } from "@/hooks/use-media-query";
2024-11-26 03:09:48 +00:00
const HeaderLogo = () => {
2024-11-28 17:23:53 +00:00
const [config] = useConfig();
2024-11-26 03:09:48 +00:00
2024-11-28 17:23:53 +00:00
const isDesktop = useMediaQuery("(min-width: 1280px)");
2024-11-26 03:09:48 +00:00
2024-11-28 17:23:53 +00:00
return config.layout === "horizontal" ? (
<Link href="/" className="flex gap-2 items-center ">
<img
className="w-100"
src="/../images/all-img/mediahub-logo.png"
alt="logo"
width={150}
/>
2024-11-28 17:23:53 +00:00
</Link>
) : (
!isDesktop && (
<Link href="/" className="flex gap-2 items-center ">
<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
)
2024-11-28 17:23:53 +00:00
);
};
2024-11-26 03:09:48 +00:00
2024-11-28 17:23:53 +00:00
export default HeaderLogo;