heheee
;
+"use client";
+
+import { useEffect, useState } from "react";
+
+type Props = {
+ count: number;
+};
+const Stars = ({ count }: Props) => {
+ const [width, setWidth] = useState(0);
+ const [height, setHeight] = useState(0);
+
+ useEffect(() => {
+ setWidth(window.innerWidth);
+ setHeight(window.innerHeight);
+ }, []);
+
+ const randomRgba = (alpha: number) => {
+ return `rgba(${Math.random() * 255}, ${Math.random() * 255}, ${Math.random() * 255}, ${alpha})`
+ }
+
+ return (
+
+ {Array.from({ length: count }).map((_it, i) => {
+ const radius = `${Math.random() * 7}px`
+ return (
+
+ );
};
export default Stars;
+
+ )
+ })}
+