Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

함께 탑승하는 인원이 없을 때, 신고하기 기능 제거 #783

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions packages/web/src/components/Chat/Header/SideMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ const SideMenu = ({ roomInfo, isOpen, setIsOpen }: SideMenuProps) => {
const onClickCallTaxi = useCallback(() => setIsOpenCallTaxi(true), []);
const onClickReport = useCallback(() => setIsOpenReport(true), []);

const isAlone = roomInfo.part.length === 1;

const styleBackground = {
position: "absolute" as any,
top: 0,
Expand Down Expand Up @@ -192,8 +194,12 @@ const SideMenu = ({ roomInfo, isOpen, setIsOpen }: SideMenuProps) => {
<SideMenuButton type="share" onClick={onClikcShare} />
<DottedLine />
<SideMenuButton type="taxi" onClick={onClickCallTaxi} />
<DottedLine />
<SideMenuButton type="report" onClick={onClickReport} />
{!isAlone && (
<>
<DottedLine />
<SideMenuButton type="report" onClick={onClickReport} />
</>
)}
</div>
<DottedLine />
<div css={styleNameSection} onClick={onClickCancel}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const MessageSet = ({ chats, layoutType, roomInfo }: MessageSetProps) => {
const authorName = "authorName" in chats?.[0] ? chats?.[0].authorName : "";

const isBot = authorId === "bot";
const isAlone = roomInfo.part.length === 1;

const style = {
position: "relative" as any,
Expand Down Expand Up @@ -148,8 +149,11 @@ const MessageSet = ({ chats, layoutType, roomInfo }: MessageSetProps) => {
<div css={styleProfileSection}>
{authorId !== userOid && (
<div
css={{ ...styleProfile, cursor: !isBot ? "pointer" : undefined }}
onClick={() => !isBot && onClickProfileImage()}
css={{
...styleProfile,
cursor: !isBot && !isAlone ? "pointer" : undefined,
}}
onClick={() => !isBot && !isAlone && onClickProfileImage()}
>
{isBot ? (
<TaxiIcon css={{ width: "100%", height: "100%" }} />
Expand Down
Loading