You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export default HomeImageSlideshow;
import { cookies } from "next/headers";
import { createServerClient } from "@supabase/ssr";
import { Database } from "@/lib/database.types";
import HomeImageSlideshow from "./home-image-slideshow";
import Image from "next/image";
export default Hero;
import About from "@/components/home/home-about";
import Hero from "@/components/home/home-hero";
import HomeOffers from "@/components/home/home-offers";
import HomePrebuilts from "@/components/home/home-prebuilts";
import BackgroundImage from "@/public/background.jpg";
import { Metadata } from "next";
import Image from "next/image";
export const metadata: Metadata = {
title: "Play Tech Store | Homepage",
description:
"Visit Play Tech Computer Solutions for all your tech needs in Ratnapura, Sri Lanka. With over 90% 5 star ratings, we offer a wide range of computer products and services. Contact us at 076 996 5262 or email us at Play [email protected]. Explore our website at https://sites.google.com/view/Play Techcomputersolutions/home for more information",
};
export default async function Home() {
return (
<>
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Website as you can see the carousels get stuck, Is there any way to fix it.
`"use client";
import React from "react";
import Autoplay from "embla-carousel-autoplay";
import {
Carousel,
CarouselMainContainer,
SliderMainItem,
} from "../ui/carousel-embla";
const HomeImageSlideshow = ({ images }: { images: React.ReactNode[] }) => {
return (
<Carousel
className=" mt-0 h-full w-full"
carouselOptions={{ watchDrag: false, loop: true }}
plugins={[
Autoplay({ delay: 2000, stopOnInteraction: false, jump: false }),
]}
>
{images ? (
images.map((i, index) => (
))
) : (
)}
);
};
export default HomeImageSlideshow;
import { cookies } from "next/headers";
import { createServerClient } from "@supabase/ssr";
import { Database } from "@/lib/database.types";
import HomeImageSlideshow from "./home-image-slideshow";
import Image from "next/image";
const Hero = async () => {
const cookieStore = cookies();
const supabase = createServerClient(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
{
cookies: {
get(name: string) {
return cookieStore.get(name)?.value;
},
},
},
);
const { data: slideShowData } = await supabase
.from("settings")
.select("*")
.eq("setting_name", "slideshow-settings")
.single();
return (
<HomeImageSlideshow
images={(
slideShowData?.settings_json as { images: string[] }
).images.map((i) => (
<Image
draggable={false}
loading="lazy"
width={2088}
height={1044}
src={i}
alt={i + "-img"}
className="aspect-[16/6] h-auto w-full bg-secondary object-cover object-center"
/>
))}
/>
);
};
export default Hero;
import About from "@/components/home/home-about";
import Hero from "@/components/home/home-hero";
import HomeOffers from "@/components/home/home-offers";
import HomePrebuilts from "@/components/home/home-prebuilts";
import BackgroundImage from "@/public/background.jpg";
import { Metadata } from "next";
import Image from "next/image";
export const metadata: Metadata = {
title: "Play Tech Store | Homepage",
description:
"Visit Play Tech Computer Solutions for all your tech needs in Ratnapura, Sri Lanka. With over 90% 5 star ratings, we offer a wide range of computer products and services. Contact us at 076 996 5262 or email us at Play [email protected]. Explore our website at https://sites.google.com/view/Play Techcomputersolutions/home for more information",
};
export default async function Home() {
return (
<>
</>
);
}
`
Beta Was this translation helpful? Give feedback.
All reactions