Skip to content

Commit

Permalink
docs: display internal in dev mode only
Browse files Browse the repository at this point in the history
  • Loading branch information
MajesticPotatoe committed Oct 20, 2023
1 parent 77ecf5a commit bb07313
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/docs/src/components/api/ApiTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,14 @@
const user = useUserStore()
const filtered = computed(() => {
if (!appStore.apiSearch) return props.items
const items = props.items.filter((item: any) => {
return user.dev || (!user.dev && item.description !== '**FOR INTERNAL USE ONLY**')
})
if (!appStore.apiSearch) return items
const query = appStore.apiSearch.toLowerCase()
return props.items.filter((item: any) => {
return items.filter((item: any) => {
return item.name.toLowerCase().includes(query)
})
})
Expand Down

0 comments on commit bb07313

Please sign in to comment.