This commit is contained in:
lingdocs 2021-09-21 17:08:02 -04:00
parent 75e1b1d30f
commit fb7fad829a
1 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,7 @@
import React, { useState } from "react";
import games from "./games";
import { useUser } from "../user-context";
import SmoothCollapse from "react-smooth-collapse";
function GamesBrowser() {
const { user } = useUser();
@ -21,14 +22,16 @@ function GamesBrowser() {
<div className="d-flex flex-row justify-content-between align-items-center">
<div>
<h4 className="my-4 clickable" onClick={() => handleTitleClick(id)}>
{open ? "🞃" : "🞂"} {title}
<i className={`fas fa-caret-${open ? "down" : "right"}`}></i> {title}
</h4>
</div>
<div>
<h4>{done ? "✅" : ""}</h4>
</div>
</div>
{open && <Game />}
<SmoothCollapse expanded={open}>
<Game />
</SmoothCollapse>
</div>
})}
</>