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
8b087e48
Commit
8b087e48
authored
Apr 13, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
404 for account pages if envs are not provided
parent
49c2f9df
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
7 deletions
+28
-7
getServerSideProps.ts
lib/next/account/getServerSideProps.ts
+21
-0
api_key.tsx
pages/account/api_key.tsx
+1
-1
custom_abi.tsx
pages/account/custom_abi.tsx
+1
-1
public_tags_request.tsx
pages/account/public_tags_request.tsx
+1
-1
tag_address.tsx
pages/account/tag_address.tsx
+1
-1
verified_addresses.tsx
pages/account/verified_addresses.tsx
+1
-1
watchlist.tsx
pages/account/watchlist.tsx
+1
-1
profile.tsx
pages/auth/profile.tsx
+1
-1
No files found.
lib/next/account/getServerSideProps.ts
0 → 100644
View file @
8b087e48
import
appConfig
from
'
configs/app/config
'
;
import
{
getServerSideProps
as
base
}
from
'
../getServerSideProps
'
;
export
const
getServerSideProps
:
typeof
base
=
async
(...
args
)
=>
{
if
(
!
appConfig
.
isAccountSupported
)
{
return
{
notFound
:
true
,
};
}
return
base
(...
args
);
};
export
const
getServerSidePropsForVerifiedAddresses
:
typeof
base
=
async
(...
args
)
=>
{
if
(
!
appConfig
.
isAccountSupported
||
!
appConfig
.
adminServiceApi
.
endpoint
||
!
appConfig
.
contractInfoApi
.
endpoint
)
{
return
{
notFound
:
true
,
};
}
return
base
(...
args
);
};
pages/account/api_key.tsx
View file @
8b087e48
...
@@ -17,4 +17,4 @@ const ApiKeysPage: NextPage = () => {
...
@@ -17,4 +17,4 @@ const ApiKeysPage: NextPage = () => {
export
default
ApiKeysPage
;
export
default
ApiKeysPage
;
export
{
getServerSideProps
}
from
'
lib/next/getServerSideProps
'
;
export
{
getServerSideProps
}
from
'
lib/next/
account/
getServerSideProps
'
;
pages/account/custom_abi.tsx
View file @
8b087e48
...
@@ -17,4 +17,4 @@ const CustomAbiPage: NextPage = () => {
...
@@ -17,4 +17,4 @@ const CustomAbiPage: NextPage = () => {
export
default
CustomAbiPage
;
export
default
CustomAbiPage
;
export
{
getServerSideProps
}
from
'
lib/next/getServerSideProps
'
;
export
{
getServerSideProps
}
from
'
lib/next/
account/
getServerSideProps
'
;
pages/account/public_tags_request.tsx
View file @
8b087e48
...
@@ -17,4 +17,4 @@ const PublicTagsPage: NextPage = () => {
...
@@ -17,4 +17,4 @@ const PublicTagsPage: NextPage = () => {
export
default
PublicTagsPage
;
export
default
PublicTagsPage
;
export
{
getServerSideProps
}
from
'
lib/next/getServerSideProps
'
;
export
{
getServerSideProps
}
from
'
lib/next/
account/
getServerSideProps
'
;
pages/account/tag_address.tsx
View file @
8b087e48
...
@@ -17,4 +17,4 @@ const AddressTagsPage: NextPage = () => {
...
@@ -17,4 +17,4 @@ const AddressTagsPage: NextPage = () => {
export
default
AddressTagsPage
;
export
default
AddressTagsPage
;
export
{
getServerSideProps
}
from
'
lib/next/getServerSideProps
'
;
export
{
getServerSideProps
}
from
'
lib/next/
account/
getServerSideProps
'
;
pages/account/verified_addresses.tsx
View file @
8b087e48
...
@@ -17,4 +17,4 @@ const VerifiedAddressesPage: NextPage = () => {
...
@@ -17,4 +17,4 @@ const VerifiedAddressesPage: NextPage = () => {
export
default
VerifiedAddressesPage
;
export
default
VerifiedAddressesPage
;
export
{
getServerSideProps
}
from
'
lib/nex
t/getServerSideProps
'
;
export
{
getServerSideProps
ForVerifiedAddresses
as
getServerSideProps
}
from
'
lib/next/accoun
t/getServerSideProps
'
;
pages/account/watchlist.tsx
View file @
8b087e48
...
@@ -19,4 +19,4 @@ const WatchListPage: NextPage = () => {
...
@@ -19,4 +19,4 @@ const WatchListPage: NextPage = () => {
export
default
WatchListPage
;
export
default
WatchListPage
;
export
{
getServerSideProps
}
from
'
lib/next/getServerSideProps
'
;
export
{
getServerSideProps
}
from
'
lib/next/
account/
getServerSideProps
'
;
pages/auth/profile.tsx
View file @
8b087e48
...
@@ -15,4 +15,4 @@ const MyProfilePage: NextPage = () => {
...
@@ -15,4 +15,4 @@ const MyProfilePage: NextPage = () => {
export
default
MyProfilePage
;
export
default
MyProfilePage
;
export
{
getServerSideProps
}
from
'
lib/next/getServerSideProps
'
;
export
{
getServerSideProps
}
from
'
lib/next/
account/
getServerSideProps
'
;
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