Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Block Explorer UI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
Block Explorer UI
Commits
e39cdc77
Commit
e39cdc77
authored
5 months ago
by
Lukas
Browse files
Options
Downloads
Patches
Plain Diff
Remove virtual operation toggle from raw view data section
parent
f9520845
No related branches found
No related tags found
2 merge requests
!481
bring recent develop changes to mater to match the backend
,
!463
Lbudginas/#340 add virtual ops block and transaction pages
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/JSONView.tsx
+1
-25
1 addition, 25 deletions
components/JSONView.tsx
with
1 addition
and
25 deletions
components/JSONView.tsx
+
1
−
25
View file @
e39cdc77
import
React
from
"
react
"
;
import
CopyJSON
from
"
./CopyJSON
"
;
import
{
useUserSettingsContext
}
from
"
../contexts/UserSettingsContext
"
;
import
{
Toggle
}
from
"
./ui/toggle
"
;
import
{
useRouter
}
from
"
next/router
"
;
import
{
cn
}
from
"
@/lib/utils
"
;
interface
JSONViewProps
{
json
:
object
;
...
...
@@ -19,12 +15,7 @@ const JSONView: React.FC<JSONViewProps> = ({
skipCopy
=
false
,
className
,
isPrettyView
,
enableRawVirtualOperations
=
false
,
handleEnableVirtualOperations
=
()
=>
{},
})
=>
{
const
router
=
useRouter
();
const
isBlockPage
=
router
.
pathname
.
startsWith
(
"
/block
"
);
const
renderJsonView
=
(()
=>
{
if
(
!
isPrettyView
)
{
return
JSON
.
stringify
(
json
);
...
...
@@ -36,22 +27,7 @@ const JSONView: React.FC<JSONViewProps> = ({
return
(
<
div
className
=
{
className
}
>
{
!
skipCopy
&&
(
<
div
className
=
{
cn
(
"
w-full flex justify-end
"
,
{
"
justify-between
"
:
isBlockPage
,
})
}
>
{
isBlockPage
&&
(
<
div
className
=
"flex justify-center items-center"
>
Virtual Operations
{
"
"
}
<
span
className
=
"ml-2"
>
<
Toggle
checked
=
{
enableRawVirtualOperations
}
onClick
=
{
handleEnableVirtualOperations
}
/>
</
span
>
</
div
>
)
}
<
div
className
=
"w-full flex justify-end"
>
<
CopyJSON
value
=
{
renderJsonView
}
/>
</
div
>
)
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment