File tree Expand file tree Collapse file tree 5 files changed +74
-13
lines changed
Expand file tree Collapse file tree 5 files changed +74
-13
lines changed Original file line number Diff line number Diff line change 11import { Flex } from "@chakra-ui/react" ;
2+ import { useTrack } from "hooks/analytics/useTrack" ;
3+ import { useEffect } from "react" ;
24import { Card , Text } from "tw-components" ;
35
4- export const NoAuthorizedWallet = ( ) => {
6+ interface EngineNavigationProps {
7+ instance : string ;
8+ }
9+
10+ export const NoAuthorizedWallet : React . FC < EngineNavigationProps > = ( {
11+ instance,
12+ } ) => {
13+ const trackEvent = useTrack ( ) ;
14+
15+ useEffect ( ( ) => {
16+ if ( instance ) {
17+ trackEvent ( {
18+ category : "engine" ,
19+ action : "set-engine-instance" ,
20+ label : "no-authorized-wallet" ,
21+ url : instance ,
22+ } ) ;
23+ }
24+ } , [ instance , trackEvent ] ) ;
25+
526 return (
627 < Card py = { 8 } >
728 < Flex flexDir = "column" gap = { 4 } >
829 < Text textAlign = "center" >
9- You do not have permission to view this Engine instance. Please
10- connect from a wallet with permission or ask the admin of the instance
11- to grant you permission.
30+ You do not have permission to view this Engine instance. Please sign
31+ in with an admin wallet.
1232 </ Text >
1333 </ Flex >
1434 </ Card >
Original file line number Diff line number Diff line change 11import { CustomConnectWallet } from "@3rdweb-sdk/react/components/connect-wallet" ;
22import { Flex } from "@chakra-ui/react" ;
3+ import { useTrack } from "hooks/analytics/useTrack" ;
4+ import { useEffect } from "react" ;
35import { Card , Text } from "tw-components" ;
46
5- export const NoConnectedWallet = ( ) => {
7+ interface EngineNavigationProps {
8+ instance : string ;
9+ }
10+
11+ export const NoConnectedWallet : React . FC < EngineNavigationProps > = ( {
12+ instance,
13+ } ) => {
14+ const trackEvent = useTrack ( ) ;
15+
16+ useEffect ( ( ) => {
17+ if ( instance ) {
18+ trackEvent ( {
19+ category : "engine" ,
20+ action : "set-engine-instance" ,
21+ label : "no-connected-wallet" ,
22+ url : instance ,
23+ } ) ;
24+ }
25+ } , [ instance , trackEvent ] ) ;
26+
627 return (
728 < Card py = { 8 } >
829 < Flex flexDir = "column" gap = { 4 } >
Original file line number Diff line number Diff line change 11import { Flex } from "@chakra-ui/react" ;
2+ import { useTrack } from "hooks/analytics/useTrack" ;
3+ import { useEffect } from "react" ;
24import { Card , Text } from "tw-components" ;
35
4- export const NoServerConnection = ( ) => {
6+ interface EngineNavigationProps {
7+ instance : string ;
8+ }
9+
10+ export const NoServerConnection : React . FC < EngineNavigationProps > = ( {
11+ instance,
12+ } ) => {
13+ const trackEvent = useTrack ( ) ;
14+
15+ useEffect ( ( ) => {
16+ if ( instance ) {
17+ trackEvent ( {
18+ category : "engine" ,
19+ action : "set-engine-instance" ,
20+ label : "no-server-connection" ,
21+ url : instance ,
22+ } ) ;
23+ }
24+ } , [ instance , trackEvent ] ) ;
25+
526 return (
627 < Card py = { 8 } >
728 < Flex flexDir = "column" gap = { 4 } >
829 < Text textAlign = "center" >
9- We weren't able to establish a connection with Engine. Please
10- ensure the URL is correct, and the server is running.
30+ We weren't able to establish a connection with your Engine
31+ instance. Please confirm the URL is correct and the server is running.
1132 </ Text >
1233 </ Flex >
1334 </ Card >
Original file line number Diff line number Diff line change @@ -157,8 +157,6 @@ export enum PageId {
157157 // ---------------------------------------------------------------------------
158158 // engine pages
159159 // ---------------------------------------------------------------------------
160- // thirdweb.com/dashboard/engine
161- Engine = "engine" ,
162160
163161 // thirdweb.com/dashboard/engine
164162 EngineManage = "engine-manage" ,
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ const EngineManage: ThirdwebNextPage = () => {
4040 .
4141 </ Text >
4242 </ Flex >
43+
4344 { instanceUrl && (
4445 < Text >
4546 Engine URL: < em > { instanceUrl } </ em > { " " }
@@ -61,7 +62,7 @@ const EngineManage: ThirdwebNextPage = () => {
6162 />
6263
6364 { ! address ? (
64- < NoConnectedWallet />
65+ < NoConnectedWallet instance = { instanceUrl } />
6566 ) : instanceUrl ? (
6667 enginePermissions . isLoading ? (
6768 < Center >
@@ -73,11 +74,11 @@ const EngineManage: ThirdwebNextPage = () => {
7374 ) : enginePermissions . isError &&
7475 ( enginePermissions ?. error as { message : string } ) . message ===
7576 "401" ? (
76- < NoAuthorizedWallet />
77+ < NoAuthorizedWallet instance = { instanceUrl } />
7778 ) : enginePermissions . isError &&
7879 ( enginePermissions ?. error as { message : string } ) . message ===
7980 "Failed to fetch" ? (
80- < NoServerConnection />
81+ < NoServerConnection instance = { instanceUrl } />
8182 ) : (
8283 < EngineNavigation instance = { instanceUrl } />
8384 )
You can’t perform that action at this time.
0 commit comments