[enhancement]: support toggling feature carousel

This commit is contained in:
Kendall Garner 2024-05-15 21:48:20 -07:00
parent 168153b211
commit bb2f8461ed
No known key found for this signature in database
GPG key ID: 18D2767419676C87
4 changed files with 29 additions and 2 deletions

View file

@ -33,11 +33,12 @@ const HomeRoute = () => {
const server = useCurrentServer();
const itemsPerPage = 15;
const { windowBarStyle } = useWindowSettings();
const { homeItems } = useGeneralSettings();
const { homeFeature, homeItems } = useGeneralSettings();
const feature = useAlbumList({
options: {
cacheTime: 1000 * 60,
enabled: homeFeature,
staleTime: 1000 * 60,
},
query: {
@ -249,7 +250,7 @@ const HomeRoute = () => {
px="2rem"
spacing="lg"
>
<FeatureCarousel data={featureItemsWithImage} />
{homeFeature && <FeatureCarousel data={featureItemsWithImage} />}
{sortedCarousel.map((carousel) => (
<MemoizedSwiperGridCarousel
key={`carousel-${carousel.uniqueId}`}