Working Changes
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
import React from "react";
|
||||
import { Drawer } from "antd";
|
||||
export default function ChatWindowComponent({ ...drawerProps }) {
|
||||
return <Drawer {...drawerProps}>Chat Windows and more</Drawer>;
|
||||
|
||||
export default function ChatWindowComponent({ toggleChatVisible }) {
|
||||
return (
|
||||
<div style={{ height: "300px" }}>
|
||||
<button onClick={() => toggleChatVisible()}>hide</button> This is a chat
|
||||
window!
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { Layout } from "antd";
|
||||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
@@ -18,17 +17,8 @@ export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(function ChatWindowContainer({ chatVisible, toggleChatVisible }) {
|
||||
return (
|
||||
<Layout.Sider
|
||||
collapsible
|
||||
defaultCollapsed
|
||||
theme="light"
|
||||
collapsedWidth={0}
|
||||
width={300}
|
||||
collapsed={!chatVisible}
|
||||
onCollapse={(collapsed, type) => toggleChatVisible()}
|
||||
>
|
||||
<ChatWindowComponent mask={false} maskClosable={false} zIndex={0} />
|
||||
</Layout.Sider>
|
||||
);
|
||||
if (chatVisible)
|
||||
return <ChatWindowComponent toggleChatVisible={toggleChatVisible} />;
|
||||
|
||||
return <div onClick={() => toggleChatVisible()}>Chat</div>;
|
||||
});
|
||||
|
||||
@@ -5,12 +5,14 @@ import UnfoldedCar from "../../assets/unfolded_car.svg";
|
||||
|
||||
export default function JobDetailCardsDamageComponent({ loading, data }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
console.log("data", data);
|
||||
const { area_of_damage } = data;
|
||||
console.log("area_of_damage", area_of_damage);
|
||||
return (
|
||||
<CardTemplate loading={loading} title={t("jobs.labels.cards.damage")}>
|
||||
{data ? (
|
||||
<span>
|
||||
<img src={UnfoldedCar} alt='Damaged Area' width={200} height={200} />
|
||||
<img src={UnfoldedCar} alt="Damaged Area" width={200} height={200} />
|
||||
</span>
|
||||
) : null}
|
||||
</CardTemplate>
|
||||
|
||||
Reference in New Issue
Block a user