style: format
This commit is contained in:
parent
a388035ce7
commit
aef3211bee
1 changed files with 4 additions and 4 deletions
|
@ -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) => (
|
||||||
|
|
Loading…
Reference in a new issue