Skip to content

Commit 2c79555

Browse files
committed
fix: update badges in processProtectedData documentation
Modified the documentation to include a ChainNotSupportedBadge for the useVoucher parameter and corrected the formatting for the app parameter. Added a script section for badge imports to enhance clarity and maintainability.
1 parent f35b3c6 commit 2c79555

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<script setup>
2+
import { computed } from 'vue';
3+
import { VPBadge } from 'vitepress/theme';
4+
import useUserStore from '@/stores/useUser.store';
5+
6+
const userStore = useUserStore();
7+
8+
// Check if Arbitrum is selected (Arbitrum chain ID is 42161)
9+
const isArbitrumSelected = computed(() => {
10+
return userStore.chainId === 42161;
11+
});
12+
13+
// Only show the badge when Arbitrum is selected
14+
const shouldShow = computed(() => isArbitrumSelected.value);
15+
</script>
16+
17+
<template>
18+
<VPBadge
19+
v-if="shouldShow"
20+
type="warning"
21+
text="Not Supported for this Chain"
22+
style="
23+
color: var(--vp-c-orange-1);
24+
background-color: hsla(0, 100%, 50%, 8%);
25+
margin-top: 1px;
26+
margin-right: 4px;
27+
"
28+
/>
29+
</template>

src/references/dataProtector/dataProtectorCore/processProtectedData.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const processProtectedDataResponse =
6464
});
6565
```
6666

67-
### app <RequiredBadge /> {#app-param}
67+
### app <RequiredBadge />
6868

6969
**Type:** `AddressOrENS`
7070

@@ -128,7 +128,7 @@ const processProtectedDataResponse =
128128
});
129129
```
130130

131-
### useVoucher <OptionalBadge />
131+
### useVoucher <ChainNotSupportedBadge /> <OptionalBadge />
132132

133133
**Type:** `boolean`
134134
**Default:** `false`
@@ -495,3 +495,9 @@ include a file named **content**, which corresponds to the protected data
495495
processed during the task.
496496

497497
:::
498+
499+
<script setup>
500+
import RequiredBadge from '@/components/RequiredBadge.vue'
501+
import OptionalBadge from '@/components/OptionalBadge.vue'
502+
import ChainNotSupportedBadge from '@/components/ChainNotSupportedBadge.vue'
503+
</script>

0 commit comments

Comments
 (0)