fix(frontend): update layout full width condition

This commit is contained in:
yassinedorbozgithub 2024-12-10 10:31:36 +01:00
parent 809223204a
commit 34948c3e01

View File

@ -6,11 +6,11 @@
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
*/ */
import { FULL_WIDTH_PATHNAMES, TRouterValues } from "@/services/types"; import { FULL_WIDTH_PATHNAMES } from "@/services/types";
type TLayout = "default" | "full_width"; type TLayout = "default" | "full_width";
export const getLayout = (pathname: string): TLayout => export const getLayout = (pathname: string): TLayout =>
FULL_WIDTH_PATHNAMES.includes(pathname as TRouterValues) FULL_WIDTH_PATHNAMES.some((path) => pathname.startsWith(path))
? "full_width" ? "full_width"
: "default"; : "default";