Pixel/link metrics pages.

This commit is contained in:
Mike Cao committed 2025-08-21 01:33:20 -07:00
1 parent 789b8b36d8
commit 8e766e2db7
42 files changed
+530 -49

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import { useConfig } from '@/components/hooks/useConfig';
import { LINKS_URL, PIXELS_URL } from '@/lib/constants';
export function useSlug(type: 'link' | 'pixel') {
const { linksUrl, pixelsUrl } = useConfig();
const hostUrl = type === 'link' ? linksUrl || LINKS_URL : pixelsUrl || PIXELS_URL;
const getSlugUrl = (slug: string) => {
return `${hostUrl}/${slug}`;
};
return { getSlugUrl, hostUrl };
}