{place.name}
++ {place.type} · {place.area} +
++ Vurdering: + {place.rating.toFixed(1)} +
++ Badges får du ved å fullføre utfordringer. De dukker opp her. +
+ > + ) +} diff --git a/client/src/components/user/CarouselSection.tsx b/client/src/components/user/CarouselSection.tsx new file mode 100644 index 0000000..e400b9d --- /dev/null +++ b/client/src/components/user/CarouselSection.tsx @@ -0,0 +1,130 @@ +import { Children, useCallback, useEffect, useRef, useState } from 'react' +import type { ReactNode } from 'react' +import { ProfileSection } from './ProfileSection' + +type CarouselSectionProps = { + id: string + title: string + icon: ReactNode + /** Vises når seksjonen ikke har noe innhold ennå. */ + emptyText: string + /** Ett `{emptyText}
+ ) : ( + // Fokuserbar, så raden kan rulles med piltastene uten mus. ++ {place.type} · {place.area} +
++ Vurdering: + {place.rating.toFixed(1)} +
+Laster profil …
} + {status === 'error' && ( ++ Kunne ikke hente profilen. Prøv å laste siden på nytt. +
+ )} + + {user && ( + <> +