fix layout loading

This commit is contained in:
Sara
2023-12-13 16:50:55 +01:00
parent 47762e9b05
commit 5d47c5d968

View File

@@ -323,15 +323,18 @@ const ParticipantList = ({
return ( return (
<div className="h-full" onClick={clearSelection}> <div className="h-full" onClick={clearSelection}>
<div onClick={preventClick}> <div onClick={preventClick}>
<div className="grid grid-cols-2 gap-2 mb-2"> <div className="grid grid-cols-7 gap-2 mb-2">
<input <input
ref={inputRef} ref={inputRef}
onChange={changeParticipantInput} onChange={changeParticipantInput}
value={participantInput} value={participantInput}
className="border border-blue-400 p-1" className="border col-span-3 border-blue-400 p-1"
/> />
{action && ( {action ? (
<button onClick={doAction} className="p-2 bg-blue-200 w-full"> <button
onClick={doAction}
className="p-2 bg-blue-200 w-full col-span-3"
>
[ [
<FontAwesomeIcon <FontAwesomeIcon
icon={faArrowTurnDown} icon={faArrowTurnDown}
@@ -339,17 +342,19 @@ const ParticipantList = ({
/> />
]{" " + action} ]{" " + action}
</button> </button>
) : (
<div className="col-span-3" />
)} )}
{loading ||
participants.loading ||
(topicWithWords.loading && (
<FontAwesomeIcon
icon={faSpinner}
className="animate-spin-slow text-gray-300 h-8"
/>
))}
</div> </div>
{loading ||
participants.loading ||
(topicWithWords.loading && (
<FontAwesomeIcon
icon={faSpinner}
className="animate-spin-slow text-gray-300 h-8"
/>
))}
{participants.response && ( {participants.response && (
<ul> <ul>
{participants.response.map((participant: Participant) => ( {participants.response.map((participant: Participant) => (