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
8078b937
Commit
8078b937
authored
Jul 31, 2023
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
404 if marketplace is not configured
parent
49301812
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
+26
-4
[id].tsx
pages/apps/[id].tsx
+13
-2
index.tsx
pages/apps/index.tsx
+13
-2
No files found.
pages/apps/[id].tsx
View file @
8078b937
import
type
{
NextPage
}
from
'
next
'
;
import
type
{
NextPage
,
GetServerSideProps
}
from
'
next
'
;
import
dynamic
from
'
next/dynamic
'
;
import
dynamic
from
'
next/dynamic
'
;
import
Head
from
'
next/head
'
;
import
Head
from
'
next/head
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
appConfig
from
'
configs/app/config
'
;
import
type
{
Props
}
from
'
lib/next/getServerSideProps
'
;
import
{
getServerSideProps
as
getServerSidePropsBase
}
from
'
lib/next/getServerSideProps
'
;
import
Page
from
'
ui/shared/Page/Page
'
;
import
Page
from
'
ui/shared/Page/Page
'
;
const
MarketplaceApp
=
dynamic
(()
=>
import
(
'
ui/pages/MarketplaceApp
'
),
{
ssr
:
false
});
const
MarketplaceApp
=
dynamic
(()
=>
import
(
'
ui/pages/MarketplaceApp
'
),
{
ssr
:
false
});
...
@@ -20,4 +23,12 @@ const MarketplaceAppPage: NextPage = () => {
...
@@ -20,4 +23,12 @@ const MarketplaceAppPage: NextPage = () => {
export
default
MarketplaceAppPage
;
export
default
MarketplaceAppPage
;
export
{
getServerSideProps
}
from
'
lib/next/getServerSideProps
'
;
export
const
getServerSideProps
:
GetServerSideProps
<
Props
>
=
async
(
args
)
=>
{
if
(
!
appConfig
.
marketplace
.
configUrl
||
!
appConfig
.
network
.
rpcUrl
)
{
return
{
notFound
:
true
,
};
}
return
getServerSidePropsBase
(
args
);
};
pages/apps/index.tsx
View file @
8078b937
import
type
{
NextPage
}
from
'
next
'
;
import
type
{
NextPage
,
GetServerSideProps
}
from
'
next
'
;
import
dynamic
from
'
next/dynamic
'
;
import
dynamic
from
'
next/dynamic
'
;
import
Head
from
'
next/head
'
;
import
Head
from
'
next/head
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
appConfig
from
'
configs/app/config
'
;
import
type
{
Props
}
from
'
lib/next/getServerSideProps
'
;
import
{
getServerSideProps
as
getServerSidePropsBase
}
from
'
lib/next/getServerSideProps
'
;
import
Page
from
'
ui/shared/Page/Page
'
;
import
Page
from
'
ui/shared/Page/Page
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
...
@@ -22,4 +25,12 @@ const MarketplacePage: NextPage = () => {
...
@@ -22,4 +25,12 @@ const MarketplacePage: NextPage = () => {
export
default
MarketplacePage
;
export
default
MarketplacePage
;
export
{
getServerSideProps
}
from
'
lib/next/getServerSideProps
'
;
export
const
getServerSideProps
:
GetServerSideProps
<
Props
>
=
async
(
args
)
=>
{
if
(
!
appConfig
.
marketplace
.
configUrl
||
!
appConfig
.
network
.
rpcUrl
)
{
return
{
notFound
:
true
,
};
}
return
getServerSidePropsBase
(
args
);
};
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