all styles completed 1:1

This commit is contained in:
plebbitor
2023-02-08 21:49:36 +01:00
parent e13e844f07
commit 6413a42702
7 changed files with 1393 additions and 228 deletions
+15
View File
@@ -0,0 +1,15 @@
import React, { useState, useEffect } from 'react';
const ImageBanner = () => {
const [currentImage, setCurrentImage] = useState(1);
useEffect(() => {
setCurrentImage(Math.floor(Math.random() * 12) + 1);
}, []);
return (
<img id="banner-img" src={`banner-${currentImage}.jpg`} alt="banner" />
);
};
export default ImageBanner;