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