Skip to content

Commit c51de18

Browse files
committed
fix: review comments and coderabbit addressed
1 parent 1c63c45 commit c51de18

29 files changed

Lines changed: 136 additions & 131 deletions

app/app.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ if (import.meta.server) {
4747
setJsonLd(createWebSiteSchema())
4848
}
4949
50-
const keyboardShortcuts = useKeyboardShortcuts()
51-
const instantSearch = useInstantSearch()
50+
const keyboardShortcuts = useKeyboardShortcutsPreference()
51+
const instantSearch = useInstantSearchPreference()
5252
5353
onKeyDown(
5454
'/',

app/components/AppHeader.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { NavigationConfig, NavigationConfigWithGroups } from '~/types'
44
import { isEditableElement } from '~/utils/input'
55
import { NPMX_DOCS_SITE } from '#shared/utils/constants'
66
7-
const keyboardShortcuts = useKeyboardShortcuts()
7+
const keyboardShortcuts = useKeyboardShortcutsPreference()
88
const discord = useDiscordLink()
99
1010
withDefaults(

app/components/Button/Base.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const props = withDefaults(
2626
2727
const el = useTemplateRef('el')
2828
29-
const keyboardShortcutsEnabled = useKeyboardShortcuts()
29+
const keyboardShortcutsEnabled = useKeyboardShortcutsPreference()
3030
3131
defineExpose({
3232
focus: () => el.value?.focus(),

app/components/Compare/PackageSelector.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const resultIndexOffset = computed(() => (showNoDependencyOption.value ? 1 : 0))
7575
7676
const numberFormatter = useNumberFormatter()
7777
78-
const keyboardShortcuts = useKeyboardShortcuts()
78+
const keyboardShortcuts = useKeyboardShortcutsPreference()
7979
8080
function addPackage(name: string) {
8181
if (packages.value.length >= maxPackages.value) return

app/components/DateTime.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const props = withDefaults(
3131
3232
const { locale } = useI18n()
3333
34-
const relativeDates = useRelativeDates()
34+
const relativeDates = useRelativeDatesPreference()
3535
3636
const dateFormatter = new Intl.DateTimeFormat(locale.value, {
3737
month: 'short',

app/components/Input/Base.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const emit = defineEmits<{
3030
3131
const el = useTemplateRef('el')
3232
33-
const keyboardShortcutsEnabled = useKeyboardShortcuts()
33+
const keyboardShortcutsEnabled = useKeyboardShortcutsPreference()
3434
3535
defineExpose({
3636
focus: () => el.value?.focus(),

app/components/InstantSearch.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
const instantSearch = useInstantSearch()
2+
const instantSearch = useInstantSearchPreference()
33
44
onPrehydrate(el => {
55
let userPreferences: Record<string, unknown> = {}

app/components/Link/Base.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const isLink = computed(() => props.variant === 'link')
6666
const isButton = computed(() => !isLink.value)
6767
const isButtonSmall = computed(() => props.size === 'small' && !isLink.value)
6868
const isButtonMedium = computed(() => props.size === 'medium' && !isLink.value)
69-
const keyboardShortcutsEnabled = useKeyboardShortcuts()
69+
const keyboardShortcutsEnabled = useKeyboardShortcutsPreference()
7070
</script>
7171

7272
<template>

app/components/Package/WeeklyDownloadStats.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ const lastDatapoint = computed(() => dataset.value.at(-1)?.period ?? '')
210210
211211
const isLoop = shallowRef(false)
212212
const showPulse = shallowRef(true)
213-
const keyboardShortcuts = useKeyboardShortcuts()
213+
const keyboardShortcuts = useKeyboardShortcutsPreference()
214214
215215
const cheatCode = [
216216
'arrowup',

app/composables/useGlobalSearch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { debounce } from 'perfect-debounce'
55
const pagesWithLocalFilter = new Set(['~username', 'org'])
66

77
export function useGlobalSearch(place: 'header' | 'content' = 'content') {
8-
const instantSearch = useInstantSearch()
8+
const instantSearch = useInstantSearchPreference()
99
const { searchProvider } = useSearchProvider()
1010
const searchProviderValue = computed(() => {
1111
const p = normalizeSearchParam(route.query.p)

0 commit comments

Comments
 (0)