chore: update prettier setting
This commit is contained in:
@@ -30,10 +30,7 @@ export default function DeleteConfirmModal({ id, closeModal }) {
|
||||
description="Are you sure want to delete this channel?"
|
||||
buttons={
|
||||
<>
|
||||
<Button
|
||||
onClick={closeModal.bind(null, undefined)}
|
||||
className="cancel"
|
||||
>
|
||||
<Button onClick={closeModal.bind(null, undefined)} className="cancel">
|
||||
Cancel
|
||||
</Button>
|
||||
<Button onClick={handleDelete} className="danger">
|
||||
|
||||
@@ -4,7 +4,7 @@ import toast from "react-hot-toast";
|
||||
import {
|
||||
useGetChannelQuery,
|
||||
useUpdateChannelMutation,
|
||||
useUpdateIconMutation,
|
||||
useUpdateIconMutation
|
||||
} from "../../app/services/channel";
|
||||
import AvatarUploader from "../../common/component/AvatarUploader";
|
||||
import Input from "../../common/component/styled/Input";
|
||||
@@ -46,7 +46,7 @@ export default function Overview({ id = 0 }) {
|
||||
const { loginUser, channel } = useSelector((store) => {
|
||||
return {
|
||||
loginUser: store.contacts.byId[store.authData.uid],
|
||||
channel: store.channels.byId[id],
|
||||
channel: store.channels.byId[id]
|
||||
};
|
||||
});
|
||||
const { data, refetch } = useGetChannelQuery(id);
|
||||
@@ -102,12 +102,7 @@ export default function Overview({ id = 0 }) {
|
||||
console.log("channel icon", channel);
|
||||
return (
|
||||
<StyledWrapper>
|
||||
<AvatarUploader
|
||||
type="channel"
|
||||
url={channel?.icon}
|
||||
name={name}
|
||||
uploadImage={updateIcon}
|
||||
/>
|
||||
<AvatarUploader type="channel" url={channel?.icon} name={name} uploadImage={updateIcon} />
|
||||
<div className="inputs">
|
||||
<div className="input">
|
||||
<Label htmlFor="name">Channel Name</Label>
|
||||
@@ -136,9 +131,7 @@ export default function Overview({ id = 0 }) {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{changed && (
|
||||
<SaveTip saveHandler={handleUpdate} resetHandler={handleReset} />
|
||||
)}
|
||||
{changed && <SaveTip saveHandler={handleUpdate} resetHandler={handleReset} />}
|
||||
{/* <button onClick={handleUpdate} className="btn">update</button> */}
|
||||
</StyledWrapper>
|
||||
);
|
||||
|
||||
@@ -12,7 +12,7 @@ export default function ChannelSetting() {
|
||||
return {
|
||||
loginUid: store.authData.uid,
|
||||
isAdmin: store.contacts.byId[store.authData.uid]?.is_admin,
|
||||
channel: store.channels.byId[cid],
|
||||
channel: store.channels.byId[cid]
|
||||
};
|
||||
});
|
||||
const navigate = useNavigate();
|
||||
@@ -52,22 +52,18 @@ export default function ChannelSetting() {
|
||||
dangers={[
|
||||
canLeave && {
|
||||
title: "Leave Channel",
|
||||
handler: toggleLeaveConfrim,
|
||||
handler: toggleLeaveConfrim
|
||||
},
|
||||
canDelete && {
|
||||
title: "Delete Channel",
|
||||
handler: toggleDeleteConfrim,
|
||||
},
|
||||
handler: toggleDeleteConfrim
|
||||
}
|
||||
]}
|
||||
>
|
||||
{currNav.component}
|
||||
</StyledSettingContainer>
|
||||
{deleteConfirm && (
|
||||
<DeleteConfirmModal closeModal={toggleDeleteConfrim} id={cid} />
|
||||
)}
|
||||
{leaveConfirm && (
|
||||
<LeaveChannel closeModal={toggleLeaveConfrim} id={cid} />
|
||||
)}
|
||||
{deleteConfirm && <DeleteConfirmModal closeModal={toggleDeleteConfrim} id={cid} />}
|
||||
{leaveConfirm && <LeaveChannel closeModal={toggleLeaveConfrim} id={cid} />}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,13 +8,13 @@ const useNavs = (channelId) => {
|
||||
{
|
||||
name: "overview",
|
||||
title: "Overview",
|
||||
component: <Overview id={channelId} />,
|
||||
component: <Overview id={channelId} />
|
||||
},
|
||||
{
|
||||
name: "members",
|
||||
title: "Members",
|
||||
component: <ManageMembers cid={channelId} />,
|
||||
},
|
||||
component: <ManageMembers cid={channelId} />
|
||||
}
|
||||
// {
|
||||
// name: "permissions",
|
||||
// title: "Permissions",
|
||||
@@ -27,8 +27,8 @@ const useNavs = (channelId) => {
|
||||
// name: "integrations",
|
||||
// title: "Integrations",
|
||||
// },
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
// {
|
||||
// title: "User Management",
|
||||
// items: [
|
||||
|
||||
Reference in New Issue
Block a user