File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,14 @@ import {
1616 ItemTitle ,
1717} from "@/registry/new-york-v4/ui/item"
1818
19+ function getHomepageUrl ( homepage : string ) {
20+ const url = new URL ( homepage )
21+ url . searchParams . set ( "utm_source" , "ui.shadcn.com" )
22+ url . searchParams . set ( "utm_medium" , "referral" )
23+ url . searchParams . set ( "utm_campaign" , "directory" )
24+ return url . toString ( )
25+ }
26+
1927export function DirectoryList ( ) {
2028 return (
2129 < ItemGroup className = "my-8" >
@@ -30,9 +38,9 @@ export function DirectoryList() {
3038 < ItemContent >
3139 < ItemTitle >
3240 < a
33- href = { registry . homepage }
41+ href = { getHomepageUrl ( registry . homepage ) }
3442 target = "_blank"
35- rel = "noopener noreferrer"
43+ rel = "noopener noreferrer external "
3644 >
3745 { registry . name }
3846 </ a >
@@ -46,9 +54,9 @@ export function DirectoryList() {
4654 < ItemActions className = "relative z-10 hidden self-start sm:flex" >
4755 < Button size = "sm" variant = "outline" asChild >
4856 < a
49- href = { registry . homepage }
57+ href = { getHomepageUrl ( registry . homepage ) }
5058 target = "_blank"
51- rel = "noopener noreferrer"
59+ rel = "noopener noreferrer external "
5260 >
5361 View < IconArrowUpRight />
5462 </ a >
You can’t perform that action at this time.
0 commit comments