mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
all styles completed 1:1
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user