chore: rename type to context
This commit is contained in:
@@ -56,7 +56,7 @@ export default function ChannelChat({ cid = "", dropFiles = [] }) {
|
||||
)}
|
||||
<Layout
|
||||
to={cid}
|
||||
type="channel"
|
||||
context="channel"
|
||||
dropFiles={dropFiles}
|
||||
// ref={containerRef}
|
||||
header={
|
||||
@@ -124,7 +124,7 @@ export default function ChannelChat({ cid = "", dropFiles = [] }) {
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
<Send id={cid} type="channel" name={name} />
|
||||
<Send key={cid} id={cid} type="channel" name={name} />
|
||||
</div>
|
||||
</StyledChannelChat>
|
||||
{/* {unreads != 0 && (
|
||||
|
||||
@@ -26,7 +26,7 @@ export default function DMChat({ uid = "", dropFiles = [] }) {
|
||||
return (
|
||||
<Layout
|
||||
to={uid}
|
||||
type="user"
|
||||
context="user"
|
||||
dropFiles={dropFiles}
|
||||
header={
|
||||
<StyledHeader>
|
||||
@@ -62,7 +62,12 @@ export default function DMChat({ uid = "", dropFiles = [] }) {
|
||||
});
|
||||
})}
|
||||
</div>
|
||||
<Send type="user" name={currUser?.name} id={currUser?.uid} />
|
||||
<Send
|
||||
key={currUser?.uid}
|
||||
type="user"
|
||||
name={currUser?.name}
|
||||
id={currUser?.uid}
|
||||
/>
|
||||
</StyledDMChat>
|
||||
</Layout>
|
||||
);
|
||||
|
||||
@@ -77,7 +77,7 @@ export default function Layout({
|
||||
header,
|
||||
contacts = null,
|
||||
dropFiles = [],
|
||||
type = "channel",
|
||||
context = "channel",
|
||||
to = null,
|
||||
}) {
|
||||
const messagesContainer = useRef(null);
|
||||
@@ -161,7 +161,7 @@ export default function Layout({
|
||||
</StyledWrapper>
|
||||
{files.length !== 0 && (
|
||||
<UploadModal
|
||||
type={type}
|
||||
context={context}
|
||||
files={files}
|
||||
sendTo={to}
|
||||
closeModal={resetFiles}
|
||||
|
||||
Reference in New Issue
Block a user