Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
HenriPro committed Aug 12, 2024
1 parent 368f499 commit 749a08a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@kong-ui-public/spec-renderer": "2.1.23",
"@kong/kong-auth-elements": "2.12.6",
"@kong/kongponents": "8.127.0",
"@kong/markdown": "^1.7.8",
"@kong/markdown": "1.7.8",
"@kong/sdk-portal-js": "2.14.0",
"@xstate/vue": "2.0.0",
"add": "^2.0.6",
Expand Down
14 changes: 5 additions & 9 deletions src/views/ApiDocumentationPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
:link-text="helpText.apiDocumentation.error.linkText"
/>

<MarkdownUi
<MarkdownUi
v-if="markdown"
class="documentation-display"
v-model="markdown"
class="documentation-display"
theme="light"
/>
</template>
Expand Down Expand Up @@ -75,7 +75,6 @@ import { MarkdownUi } from '@kong/markdown'
import '@kong/markdown/dist/style.css'
import { DocumentBlock, ProductDocument } from '@kong/sdk-portal-js'


export default defineComponent({
name: 'ApiDocumentationPage',
components: {
Expand All @@ -100,7 +99,6 @@ export default defineComponent({
const { portalApiV2 } = usePortalApi()
const documentationDisplay = ref()


const breadcrumbs = computed(() => ([
{
key: 'product-catalog',
Expand Down Expand Up @@ -138,7 +136,6 @@ export default defineComponent({
const markdown = ref<string>(null)
const content = ref<DocumentBlock>(null)


const sections = computed(() => {
if (!content.value) {
return []
Expand Down Expand Up @@ -171,13 +168,13 @@ export default defineComponent({
errorCode.value = null
isDocumentLoading.value = true

const getMarkdown = portalApiV2.value.service.documentationApi.getProductDocument({
const getMarkdown = portalApiV2.value.service.documentationApi.getProductDocument({
productId,
documentId: slug
})
.then((res) => {
markdown.value = res.data.content
})
})

const getDocumentNodes = portalApiV2.value.service.documentationApi.getProductDocument({
productId,
Expand All @@ -193,14 +190,13 @@ export default defineComponent({
title.value = data.title
content.value = data.content
productStore.setActiveDocumentId(data.id)
})
})

await Promise.all([getMarkdown, getDocumentNodes]).finally(() => {
isDocumentLoading.value = false
})
}


const handleError = (error) => {
notify({
appearance: 'danger',
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@
v-calendar "3.0.0-alpha.8"
vue-draggable-next "^2.2.1"

"@kong/markdown@^1.7.8":
"@kong/[email protected]":
version "1.7.8"
resolved "https://registry.yarnpkg.com/@kong/markdown/-/markdown-1.7.8.tgz#24c451cdbd38381cb9b973dfc47370a70e5623c1"
integrity sha512-cnow1XfB1UAApiJgYX44nU9cUsGSwxxuKCDDrCTBPTQDcd9jDgjw2Dm/H/9/JHcKuQGtzSe9fNbyBFOilp7dLg==
Expand Down

0 comments on commit 749a08a

Please sign in to comment.