@@ -26,7 +26,8 @@ import { useDashboardRouter } from "@/lib/DashboardRouter";
2626import { cn } from "@/lib/utils" ;
2727import { LazyCreateProjectDialog } from "components/settings/ApiKeys/Create/LazyCreateAPIKeyDialog" ;
2828import { formatDate } from "date-fns" ;
29- import { PlusIcon , SearchIcon } from "lucide-react" ;
29+ import { useTrack } from "hooks/analytics/useTrack" ;
30+ import { PlusIcon , SearchIcon , UserPlus } from "lucide-react" ;
3031import Link from "next/link" ;
3132import { useMemo , useState } from "react" ;
3233import type { ThirdwebClient } from "thirdweb" ;
@@ -119,6 +120,9 @@ export function TeamProjectsPage(props: {
119120 createProject = { ( ) => setIsCreateProjectDialogOpen ( true ) }
120121 teamMembersSettingsPath = { `/team/${ props . team . slug } /~/settings/members` }
121122 />
123+ < Link href = { `/team/${ props . team . slug } /~/settings/members` } >
124+ < ShareButton />
125+ </ Link >
122126 </ div >
123127 </ div >
124128 </ div >
@@ -279,6 +283,29 @@ function AddNewButton(props: {
279283 ) ;
280284}
281285
286+ function ShareButton ( ) {
287+ //track event click
288+ const trackEvent = useTrack ( ) ;
289+ return (
290+ < Button
291+ variant = "default"
292+ className = "absolute top-0 right-0 gap-2 lg:static"
293+ onClick = { ( ) =>
294+ trackEvent ( {
295+ category : "inviteTeam" ,
296+ action : "click" ,
297+ label : "invite-team" ,
298+ } )
299+ }
300+ >
301+ < UserPlus className = "size-4" />
302+ < span >
303+ < span className = "hidden lg:inline" > Invite</ span > Team
304+ </ span >
305+ </ Button >
306+ ) ;
307+ }
308+
282309function SelectBy ( props : {
283310 value : SortById ;
284311 onChange : ( value : SortById ) => void ;
0 commit comments