refactor: fix lint warnings
This commit is contained in:
parent
6d5e7d1df1
commit
08daa55569
|
|
@ -1,11 +1,11 @@
|
|||
import { JSX } from 'preact'
|
||||
import { ComponentChildren, JSX } from 'preact'
|
||||
|
||||
type Units = 'rem' | '%' | 'px'
|
||||
|
||||
export function AutoGrid(
|
||||
{ columnWidth, children, style }: {
|
||||
columnWidth: `${number}${Units}`
|
||||
children: JSX.Element | JSX.Element[]
|
||||
children: ComponentChildren
|
||||
style?: JSX.CSSProperties
|
||||
},
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ export default function Home() {
|
|||
<AutoGrid columnWidth='15rem' style={{ alignItems: 'center' }}>
|
||||
<BlogCardList
|
||||
limit={4}
|
||||
usePlaceholder={true}
|
||||
useObserver={true}
|
||||
usePlaceholder
|
||||
useObserver
|
||||
/>
|
||||
<a href='/blog' class='cta'>Voir plus</a>
|
||||
</AutoGrid>
|
||||
|
|
@ -36,19 +36,15 @@ export default function Home() {
|
|||
accompagnes dans vos projets, grâce à son parc de machine...
|
||||
</p>
|
||||
<AutoGrid columnWidth='15rem' style={{ alignItems: 'center' }}>
|
||||
<>
|
||||
{machineMock.slice(0, 4).map(MachineCard)}
|
||||
<a href='/machines' class='cta'>Réserver</a>
|
||||
</>
|
||||
{machineMock.slice(0, 4).map(MachineCard)}
|
||||
<a href='/machines' class='cta'>Réserver</a>
|
||||
</AutoGrid>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Nos projets</h2>
|
||||
<AutoGrid columnWidth='30rem' style={{ alignItems: 'center' }}>
|
||||
<>
|
||||
{projectMock.slice(0, 4).map(ProjectCard)}
|
||||
<a href='/projets' class='cta'>Participer</a>
|
||||
</>
|
||||
{projectMock.slice(0, 4).map(ProjectCard)}
|
||||
<a href='/projets' class='cta'>Participer</a>
|
||||
</AutoGrid>
|
||||
</section>
|
||||
<section>
|
||||
|
|
@ -56,8 +52,8 @@ export default function Home() {
|
|||
<AutoGrid columnWidth='16rem' style={{ alignItems: 'center' }}>
|
||||
<MemberCardList
|
||||
limit={4}
|
||||
usePlaceholder={true}
|
||||
useObserver={true}
|
||||
usePlaceholder
|
||||
useObserver
|
||||
/>
|
||||
<a href='/membres' class='cta'>Nous découvrir</a>
|
||||
</AutoGrid>
|
||||
|
|
|
|||
Loading…
Reference in a new issue