Pixel/link metrics pages.
This commit is contained in:
1 parent
789b8b36d8
commit
8e766e2db7
42 files changed
+530
-49
No files matched your search
@@ -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 };
|
||||
}
|
||||
Reference in new issue
Block a user