Skip to content

Commit 00d539e

Browse files
committed
docs+ui: note languages.ts requirement; default export to current lang + catalog only
1 parent a761cbd commit 00d539e

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/components/ExportDropdown.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ const googleEnabled = Boolean(import.meta.env.VITE_GOOGLE_CLIENT_ID)
1919
export function ExportDropdown({ currentLang, packages, scanned, generated, indexUrl }: Props) {
2020
const { customerId } = useCustomer()
2121
const [open, setOpen] = useState(false)
22-
const [scope, setScope] = useState<'current' | 'all'>('all')
23-
const [detail, setDetail] = useState<ExportDetail>('summary')
22+
const [scope, setScope] = useState<'current' | 'all'>('current')
23+
const [detail, setDetail] = useState<ExportDetail>('catalog')
2424
const [downloading, setDownloading] = useState(false)
2525
const [sheetsState, setSheetsState] = useState<'idle' | 'uploading' | 'error'>('idle')
2626
const wrapRef = useRef<HTMLDivElement>(null)

src/languages.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ export interface Language {
88
}
99

1010
const base = import.meta.env.BASE_URL
11+
// All languages must be listed here, even if disabled. The export feature
12+
// iterates this array to find which languages have data for the current POV.
1113
export const LANGUAGES: Language[] = [
1214
{ id: 'python', label: 'Python', icon: `${base}icons/python.svg`, hasIndexUrl: true, scanTool: 'pip-audit · OSV' },
1315
{ id: 'javascript', label: 'JavaScript', icon: `${base}icons/javascript.svg`, hasIndexUrl: false, scanTool: 'osv-scanner · OSV' },

0 commit comments

Comments
 (0)