Don't reload on showing chat (#79)
This commit is contained in:
parent
35d32b9292
commit
1ac0ebca18
|
@ -62,17 +62,14 @@ function DragDiv() {
|
||||||
document.addEventListener("mouseup", onMouseUp);
|
document.addEventListener("mouseup", onMouseUp);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{showChat && (
|
<FloatingDiv className={showChat ? "" : "hide"}>
|
||||||
<>
|
|
||||||
<div
|
|
||||||
style={{ height: "calc(100% - 50px)", border: "1px solid black" }}
|
|
||||||
>
|
|
||||||
<ReactChat
|
<ReactChat
|
||||||
theme={lightTheme}
|
theme={lightTheme}
|
||||||
community={community}
|
community={community}
|
||||||
fetchMetadata={fetchMetadata}
|
fetchMetadata={fetchMetadata}
|
||||||
/>
|
/>
|
||||||
</div>
|
</FloatingDiv>
|
||||||
|
{showChat && (
|
||||||
<SizeSet
|
<SizeSet
|
||||||
onMouseDown={() => {
|
onMouseDown={() => {
|
||||||
setting.current = "size";
|
setting.current = "size";
|
||||||
|
@ -80,12 +77,20 @@ function DragDiv() {
|
||||||
document.addEventListener("mouseup", onMouseUp);
|
document.addEventListener("mouseup", onMouseUp);
|
||||||
}}
|
}}
|
||||||
></SizeSet>
|
></SizeSet>
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
</Drag>
|
</Drag>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const FloatingDiv = styled.div`
|
||||||
|
height: calc(100% - 50px);
|
||||||
|
border: 1px solid black;
|
||||||
|
|
||||||
|
&.hide {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
const SizeSet = styled.div`
|
const SizeSet = styled.div`
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: 0px;
|
margin-right: 0px;
|
||||||
|
|
Loading…
Reference in New Issue