landing + single company + auth

This commit is contained in:
hamid zarghami
2025-05-19 12:06:59 +03:30
parent c4c0c93599
commit 2fbdf05a25
29 changed files with 771 additions and 548 deletions
+10
View File
@@ -1,4 +1,5 @@
import { twMerge } from "tailwind-merge";
import { useParams } from "react-router-dom";
/**
* Concatenates truthy classes into a space-separated string.
@@ -9,3 +10,12 @@ import { twMerge } from "tailwind-merge";
export const clx = (...classes: (string | boolean | undefined)[]): string => {
return twMerge(classes.filter(Boolean).join(" "));
};
export const buildPath = (path: string, slug2?: string): string => {
if (slug2) {
return `/${slug2}/${path}`;
} else {
const { slug } = useParams() as { slug: string };
return `/${slug}/${path}`;
}
};