style: format

This commit is contained in:
Team1280Programming 2024-02-15 00:52:47 +00:00 committed by github-actions[bot]
parent a388035ce7
commit aef3211bee

View file

@ -8,9 +8,7 @@ const VersionChooser = ({
slug, slug,
}: Readonly<{ doc: Document; slug: string }>) => { }: Readonly<{ doc: Document; slug: string }>) => {
const { file } = doc const { file } = doc
const { const { latest } = doc.manifest
latest,
} = doc.manifest
const fileEnding = file === 'other' ? '' : `.${file}` const fileEnding = file === 'other' ? '' : `.${file}`
const [selectedRevision, setSelectedRevision] = useState<number>(latest) // Initialize the selected revision with the latest revision const [selectedRevision, setSelectedRevision] = useState<number>(latest) // Initialize the selected revision with the latest revision
@ -36,7 +34,9 @@ const VersionChooser = ({
<select <select
className='ml-2 p-2.5 bg-slate-300 rounded-md' className='ml-2 p-2.5 bg-slate-300 rounded-md'
value={`v${selectedRevision}`} value={`v${selectedRevision}`}
onChange={(e) => { setSelectedRevision(parseInt(e.target.value.replace(/\D/g, ''), 10)) }} onChange={(e) => {
setSelectedRevision(parseInt(e.target.value.replace(/\D/g, ''), 10))
}}
> >
{Array.from({ length: latest }, (_, index) => index + 1).map( {Array.from({ length: latest }, (_, index) => index + 1).map(
(version) => ( (version) => (