Skip to content

Commit

Permalink
Add slides stub
Browse files Browse the repository at this point in the history
  • Loading branch information
krishaamer committed May 6, 2024
1 parent 09f6321 commit ed32617
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 20 deletions.
5 changes: 5 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@
width: auto;
}

.swiper {
width: 600px;
height: 300px;
}

* {
@apply border-border;
}
Expand Down
55 changes: 35 additions & 20 deletions components/llm-factories/index.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,50 @@
"use client";

import { APIProvider, Map, Marker } from "@vis.gl/react-google-maps";
import { Swiper, SwiperSlide } from "swiper/react";
import "swiper/css";

export default function Factories() {
const position = { lat: 23.0124433, lng: 120.212851 };
const marker1 = { lat: 23.0124433, lng: 120.312851 };
const marker2 = { lat: 23.018500, lng: 120.312751 };
const marker2 = { lat: 23.0185, lng: 120.312751 };
const marker3 = { lat: 23.0124222, lng: 120.318951 };

return (
<div
style={{ height: "500px", width: "100%" }}
className="rounded-lg shadow-lg ring overflow-hidden"
>
<APIProvider
apiKey={
process.env.REACT_APP_GOOGLE_MAPS_API_KEY ||
"AIzaSyB6uP_GJFF4Ngfxdp3aftquS7cYp_tgw18"
}
<div>
<Swiper
spaceBetween={50}
slidesPerView={3}
onSlideChange={() => console.log("slide change")}
onSwiper={(swiper) => console.log(swiper)}
>
<Map
defaultCenter={position}
defaultZoom={13}
gestureHandling={"greedy"}
disableDefaultUI={true}
<SwiperSlide>Slide 1</SwiperSlide>
<SwiperSlide>Slide 2</SwiperSlide>
<SwiperSlide>Slide 3</SwiperSlide>
<SwiperSlide>Slide 4</SwiperSlide>
</Swiper>
<div
style={{ height: "500px", width: "100%" }}
className="rounded-lg shadow-lg ring overflow-hidden"
>
<APIProvider
apiKey={
process.env.REACT_APP_GOOGLE_MAPS_API_KEY ||
"AIzaSyB6uP_GJFF4Ngfxdp3aftquS7cYp_tgw18"
}
>
<Marker position={marker1} />
<Marker position={marker2} />
<Marker position={marker3} />
</Map>
</APIProvider>
<Map
defaultCenter={position}
defaultZoom={13}
gestureHandling={"greedy"}
disableDefaultUI={true}
>
<Marker position={marker1} />
<Marker position={marker2} />
<Marker position={marker3} />
</Map>
</APIProvider>
</div>
</div>
);
}

0 comments on commit ed32617

Please sign in to comment.