Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
f1aa43bb
Commit
f1aa43bb
authored
Sep 02, 2022
by
tom
Committed by
isstuev
Sep 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add 404 error for unknown networks
parent
beec5c82
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
101 additions
and
9 deletions
+101
-9
networks.ts
lib/networks.ts
+5
-1
api_key.tsx
pages/[network_type]/[network_sub_type]/account/api_key.tsx
+12
-1
custom_abi.tsx
.../[network_type]/[network_sub_type]/account/custom_abi.tsx
+12
-1
public_tags_request.tsx
..._type]/[network_sub_type]/account/public_tags_request.tsx
+12
-1
tag_address.tsx
...[network_type]/[network_sub_type]/account/tag_address.tsx
+12
-1
tag_transaction.tsx
...work_type]/[network_sub_type]/account/tag_transaction.tsx
+12
-1
watchlist.tsx
...s/[network_type]/[network_sub_type]/account/watchlist.tsx
+12
-1
profile.tsx
pages/[network_type]/[network_sub_type]/auth/profile.tsx
+12
-1
index.tsx
pages/[network_type]/[network_sub_type]/index.tsx
+12
-1
No files found.
lib/networks.ts
View file @
f1aa43bb
...
...
@@ -106,8 +106,12 @@ export const NETWORKS: Array<Network> = (() => {
// },
// ];
export
const
ACCOUNT_ROUTES
=
[
'
/watchlist
'
,
'
/
private-tags
'
,
'
/public-tags
'
,
'
/api-keys
'
,
'
/custom-
abi
'
];
export
const
ACCOUNT_ROUTES
=
[
'
/watchlist
'
,
'
/
tag_address
'
,
'
/tag_transaction
'
,
'
/public_tags_request
'
,
'
/api_key
'
,
'
/custom_
abi
'
];
export
function
isAccountRoute
(
route
:
string
)
{
return
ACCOUNT_ROUTES
.
includes
(
route
);
}
export
function
getAvailablePaths
()
{
return
NETWORKS
.
map
(({
type
,
subType
})
=>
({
params
:
{
network_type
:
type
,
network_sub_type
:
subType
}
}));
}
pages/[network_type]/[network_sub_type]/account/api_key.tsx
View file @
f1aa43bb
import
type
{
NextPage
}
from
'
next
'
;
import
type
{
NextPage
,
GetStaticPaths
}
from
'
next
'
;
import
Head
from
'
next/head
'
;
import
React
from
'
react
'
;
import
{
getAvailablePaths
}
from
'
lib/networks
'
;
import
ApiKeys
from
'
ui/pages/ApiKeys
'
;
const
ApiKeysPage
:
NextPage
=
()
=>
{
...
...
@@ -14,3 +15,13 @@ const ApiKeysPage: NextPage = () => {
};
export
default
ApiKeysPage
;
export
const
getStaticPaths
:
GetStaticPaths
=
async
()
=>
{
return
{
paths
:
getAvailablePaths
(),
fallback
:
false
};
};
export
const
getStaticProps
=
async
()
=>
{
return
{
props
:
{},
};
};
pages/[network_type]/[network_sub_type]/account/custom_abi.tsx
View file @
f1aa43bb
import
type
{
NextPage
}
from
'
next
'
;
import
type
{
NextPage
,
GetStaticPaths
}
from
'
next
'
;
import
Head
from
'
next/head
'
;
import
React
from
'
react
'
;
import
{
getAvailablePaths
}
from
'
lib/networks
'
;
import
CustomAbi
from
'
ui/pages/CustomAbi
'
;
const
CustomAbiPage
:
NextPage
=
()
=>
{
...
...
@@ -14,3 +15,13 @@ const CustomAbiPage: NextPage = () => {
};
export
default
CustomAbiPage
;
export
const
getStaticPaths
:
GetStaticPaths
=
async
()
=>
{
return
{
paths
:
getAvailablePaths
(),
fallback
:
false
};
};
export
const
getStaticProps
=
async
()
=>
{
return
{
props
:
{},
};
};
pages/[network_type]/[network_sub_type]/account/public_tags_request.tsx
View file @
f1aa43bb
import
type
{
NextPage
}
from
'
next
'
;
import
type
{
NextPage
,
GetStaticPaths
}
from
'
next
'
;
import
Head
from
'
next/head
'
;
import
React
from
'
react
'
;
import
{
getAvailablePaths
}
from
'
lib/networks
'
;
import
PublicTags
from
'
ui/pages/PublicTags
'
;
const
PublicTagsPage
:
NextPage
=
()
=>
{
...
...
@@ -14,3 +15,13 @@ const PublicTagsPage: NextPage = () => {
};
export
default
PublicTagsPage
;
export
const
getStaticPaths
:
GetStaticPaths
=
async
()
=>
{
return
{
paths
:
getAvailablePaths
(),
fallback
:
false
};
};
export
const
getStaticProps
=
async
()
=>
{
return
{
props
:
{},
};
};
pages/[network_type]/[network_sub_type]/account/tag_address.tsx
View file @
f1aa43bb
import
type
{
NextPage
}
from
'
next
'
;
import
type
{
NextPage
,
GetStaticPaths
}
from
'
next
'
;
import
Head
from
'
next/head
'
;
import
React
from
'
react
'
;
import
{
getAvailablePaths
}
from
'
lib/networks
'
;
import
PrivateTags
from
'
ui/pages/PrivateTags
'
;
const
AddressTagsPage
:
NextPage
=
()
=>
{
...
...
@@ -14,3 +15,13 @@ const AddressTagsPage: NextPage = () => {
};
export
default
AddressTagsPage
;
export
const
getStaticPaths
:
GetStaticPaths
=
async
()
=>
{
return
{
paths
:
getAvailablePaths
(),
fallback
:
false
};
};
export
const
getStaticProps
=
async
()
=>
{
return
{
props
:
{},
};
};
pages/[network_type]/[network_sub_type]/account/tag_transaction.tsx
View file @
f1aa43bb
import
type
{
NextPage
}
from
'
next
'
;
import
type
{
NextPage
,
GetStaticPaths
}
from
'
next
'
;
import
Head
from
'
next/head
'
;
import
React
from
'
react
'
;
import
{
getAvailablePaths
}
from
'
lib/networks
'
;
import
PrivateTags
from
'
ui/pages/PrivateTags
'
;
const
TransactionTagsPage
:
NextPage
=
()
=>
{
...
...
@@ -14,3 +15,13 @@ const TransactionTagsPage: NextPage = () => {
};
export
default
TransactionTagsPage
;
export
const
getStaticPaths
:
GetStaticPaths
=
async
()
=>
{
return
{
paths
:
getAvailablePaths
(),
fallback
:
false
};
};
export
const
getStaticProps
=
async
()
=>
{
return
{
props
:
{},
};
};
pages/[network_type]/[network_sub_type]/account/watchlist.tsx
View file @
f1aa43bb
import
type
{
NextPage
}
from
'
next
'
;
import
type
{
NextPage
,
GetStaticPaths
}
from
'
next
'
;
import
Head
from
'
next/head
'
;
import
React
from
'
react
'
;
import
{
getAvailablePaths
}
from
'
lib/networks
'
;
import
WatchList
from
'
ui/pages/Watchlist
'
;
const
WatchListPage
:
NextPage
=
()
=>
{
...
...
@@ -14,3 +15,13 @@ const WatchListPage: NextPage = () => {
};
export
default
WatchListPage
;
export
const
getStaticPaths
:
GetStaticPaths
=
async
()
=>
{
return
{
paths
:
getAvailablePaths
(),
fallback
:
false
};
};
export
const
getStaticProps
=
async
()
=>
{
return
{
props
:
{},
};
};
pages/[network_type]/[network_sub_type]/auth/profile.tsx
View file @
f1aa43bb
import
type
{
NextPage
}
from
'
next
'
;
import
type
{
NextPage
,
GetStaticPaths
}
from
'
next
'
;
import
Head
from
'
next/head
'
;
import
React
from
'
react
'
;
import
{
getAvailablePaths
}
from
'
lib/networks
'
;
import
MyProfile
from
'
ui/pages/MyProfile
'
;
const
MyProfilePage
:
NextPage
=
()
=>
{
...
...
@@ -14,3 +15,13 @@ const MyProfilePage: NextPage = () => {
};
export
default
MyProfilePage
;
export
const
getStaticPaths
:
GetStaticPaths
=
async
()
=>
{
return
{
paths
:
getAvailablePaths
(),
fallback
:
false
};
};
export
const
getStaticProps
=
async
()
=>
{
return
{
props
:
{},
};
};
pages/[network_type]/[network_sub_type]/index.tsx
View file @
f1aa43bb
import
{
Center
,
VStack
,
Box
}
from
'
@chakra-ui/react
'
;
import
type
{
NextPage
}
from
'
next
'
;
import
type
{
NextPage
,
GetStaticPaths
}
from
'
next
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
from
'
react
'
;
import
{
getAvailablePaths
}
from
'
lib/networks
'
;
import
Page
from
'
ui/shared/Page/Page
'
;
const
Home
:
NextPage
=
()
=>
{
...
...
@@ -22,3 +23,13 @@ const Home: NextPage = () => {
};
export
default
Home
;
export
const
getStaticPaths
:
GetStaticPaths
=
async
()
=>
{
return
{
paths
:
getAvailablePaths
(),
fallback
:
false
};
};
export
const
getStaticProps
=
async
()
=>
{
return
{
props
:
{},
};
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment