to do: debugging for handling ui collapse states

This commit is contained in:
2022-09-10 19:55:35 -05:00
parent c887e5ad74
commit 6ac83ef008
6 changed files with 52 additions and 30 deletions

View File

@@ -6,7 +6,7 @@ import { CardData } from "../../util/types"
import Card from "../Card/Card"
import "./CardRow.scss";
export default function CardRow({tier, state, setState}: CardRowProps) {
export default function CardRow({tier, state, setState, liftCollapsed}: CardRowProps) {
const [collapsed, setCollapsed] = useState(true);
const typedTier = cardTierToKey(tier);
@@ -27,11 +27,7 @@ export default function CardRow({tier, state, setState}: CardRowProps) {
}
useEffect(() => {
/**
* run callback function to pass state of collapsed to parent component
* repeat this process in Nobles.tsx
**/
console.log(collapsed);
liftCollapsed(collapsed, tier);
}, [collapsed])
return (