Skip to content

Commit

Permalink
Merge pull request #45 from nuuxcode/debug
Browse files Browse the repository at this point in the history
Update UI
  • Loading branch information
nuuxcode authored Dec 17, 2023
2 parents 34e1fd2 + 73d867f commit 7ba2386
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 4 additions & 3 deletions frontend/src/components/footer/footer.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Footer = () => {
<Link to="/">
<Image src={logoImage} width={"150px"} />
</Link>
<Flex gap="8" flexDirection={{ base: "column", md: "row" }}>
<Flex gap="8" mr={35} flexDirection={{ base: "column", md: "row" }}>
<Link to="/">
<Button
paddingStart={0}
Expand All @@ -40,7 +40,7 @@ const Footer = () => {
</Link>

{footerItems.map((item, i) => (
<A key={i} href={window.location.origin+"/"+item.path}>
<A key={i} href={window.location.origin + "/" + item.path}>
<Button
paddingStart={0}
paddingEnd={0}
Expand Down Expand Up @@ -70,7 +70,8 @@ const Footer = () => {
<Link to="/" className="hover:underline">
BikeHub
</Link>
. All Rights Reserved.
. All Rights Reserved.<br />
<Link to="https://github.com/nuuxcode/BikeHub" className="hover:underline">Made with ❤️ by nuuX & Ayoub & Bio.</Link>
</span>
</div>
</footer>
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/components/home/bikes/swiperBikes.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const SwiperBikes = () => {
const [parks, setParks] = useState([]);
const [selectedParkId, setSelectedParkId] = useState("all");
const swiperRef = useRef<SwiperCore | null>(null);
const [isSwiperInitialized, setIsSwiperInitialized] = useState(false);
const [, setSlideIndex] = useState(0);
useEffect(() => {
axios
Expand Down Expand Up @@ -128,6 +129,10 @@ const SwiperBikes = () => {
},
}}
spaceBetween={18}
onAfterInit={(swiper) => {
swiperRef.current = swiper;
setIsSwiperInitialized(true);
}}
onSlideChange={(swiper) => {
setSlideIndex(swiper.activeIndex);
}}
Expand All @@ -149,7 +154,7 @@ const SwiperBikes = () => {
onClick={() => swiperRef.current?.slidePrev()}
/>
<HiArrowRight
className={`cursor-pointer font-bold transform hover:scale-125 transition-transform ${swiperRef.current?.isEnd ? 'text-gray-500' : 'text-green-500'}`}
className={`cursor-pointer font-bold transform hover:scale-125 transition-transform ${!isSwiperInitialized || swiperRef.current?.isEnd ? 'text-gray-500' : 'text-green-500'}`}
size={24}
onClick={() => swiperRef.current?.slideNext()}
/>
Expand Down

0 comments on commit 7ba2386

Please sign in to comment.