Removed some unused components and polished code

This commit is contained in:
Keannu Christian Bernasol 2023-02-21 14:44:24 +08:00
parent 308f193756
commit 902fe044a1
6 changed files with 12 additions and 82 deletions

View file

@ -1,30 +0,0 @@
import React from "react";
export interface props {
children: React.ReactNode;
}
export default function DashboardContainer(props: props) {
return (
<div style={{ marginRight: 32, marginLeft: 32 }}>
<div
style={{
display: "flex",
flexDirection: "column",
alignSelf: "flex-start",
justifyContent: "left",
backgroundColor: "#1d3b33",
borderRadius: 16,
padding: 16,
width: "100%",
height: "100%",
lineHeight: 0.4,
marginLeft: 8,
marginRight: 8,
}}
>
{props.children}
</div>
</div>
);
}

View file

@ -1,47 +0,0 @@
import React, { useEffect, useState } from "react";
export interface props {
children: React.ReactNode;
}
export default function ProductListEntry(props: props) {
const [size, setSize] = useState(64);
useEffect(() => {
function onEnter() {
setSize(256);
}
function onLeave() {
setSize(128);
}
document
.getElementById("container")
?.addEventListener("mouseenter", onEnter);
document
.getElementById("container")
?.addEventListener("mouseleave", onLeave);
return () => {
document
.getElementById("container")
?.removeEventListener("mouseenter", onEnter);
document
.getElementById("container")
?.removeEventListener("mouseleave", onLeave);
};
}, []);
return (
<div
id="container"
style={{
justifyContent: "center",
alignItems: "center",
backgroundColor: "#497f4d",
width: size,
height: size,
}}
>
{props.children}
</div>
);
}