Skip to content

Commit

Permalink
Merge branch '#615-netlify-pr' of https://github.com/sparcs-kaist/tax…
Browse files Browse the repository at this point in the history
…i-front into #615-netlify-pr
  • Loading branch information
cokia committed Sep 5, 2023
2 parents 9747dca + 370d1f5 commit a4b8d4b
Show file tree
Hide file tree
Showing 44 changed files with 1,486 additions and 864 deletions.
90 changes: 0 additions & 90 deletions src/components/AccountSelector.tsx

This file was deleted.

29 changes: 18 additions & 11 deletions src/components/Chat/Header/SideMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import DottedLine from "components/DottedLine";
import {
ModalCallTaxi,
ModalChatCancel,
ModalChatReport,
ModalRoomShare,
} from "components/ModalPopup";
import User from "components/User";
Expand Down Expand Up @@ -75,18 +76,20 @@ const SideMenu = ({ roomInfo, isOpen, setIsOpen }: SideMenuProps) => {
const setAlert = useSetRecoilState(alertAtom);
const [isOpenShare, setIsOpenShare] = useState<boolean>(false);
const [isOpenCallTaxi, setIsOpenCallTaxi] = useState<boolean>(false);
const [isOpenReport, setIsOpenReport] = useState<boolean>(false);
const [isOpenCancel, setIsOpenCancel] = useState<boolean>(false);
const isDepart = useIsTimeOver(dayServerToClient(roomInfo.time)); // 방 출발 여부
const isDeparted = useIsTimeOver(dayServerToClient(roomInfo.time)); // 방 출발 여부

const onClikcShare = useCallback(() => setIsOpenShare(true), []);
const onClickCancel = useCallback(
() =>
isDepart
isDeparted
? setAlert("출발 시각이 이전인 방은 탑승 취소를 할 수 없습니다.")
: setIsOpenCancel(true),
[isDepart]
[isDeparted]
);
const onClickCallTaxi = useCallback(() => setIsOpenCallTaxi(true), []);
const onClickReport = useCallback(() => setIsOpenReport(true), []);

const styleBackground = {
position: "absolute" as any,
Expand Down Expand Up @@ -181,33 +184,32 @@ const SideMenu = ({ roomInfo, isOpen, setIsOpen }: SideMenuProps) => {
</div>
</div>
<div css={styleUsers}>
{/* @fixme @todo 유저의 정산 정보 넘겨주나? */}
{roomInfo.part.map((item) => (
<User key={item._id} value={item} />
<User key={item._id} value={item} isDeparted={isDeparted} />
))}
</div>
</div>
<DottedLine />
<SideMenuButton type="share" onClick={onClikcShare} />
{/* <DottedLine />
<SideMenuButton type="report" /> */}
<DottedLine />
<SideMenuButton type="taxi" onClick={onClickCallTaxi} />
<DottedLine />
<SideMenuButton type="report" onClick={onClickReport} />
</div>
<DottedLine />
<div css={styleNameSection} onClick={onClickCancel}>
<LogoutOutlinedIcon
style={{
fontSize: "24px",
fill: isDepart ? theme.gray_text : theme.purple,
...theme.cursor(isDepart),
fill: isDeparted ? theme.gray_text : theme.purple,
...theme.cursor(isDeparted),
}}
/>
<div
css={{
color: isDepart ? theme.gray_text : theme.purple,
color: isDeparted ? theme.gray_text : theme.purple,
...theme.font18,
...theme.cursor(isDepart),
...theme.cursor(isDeparted),
}}
>
탑승 취소
Expand All @@ -230,6 +232,11 @@ const SideMenu = ({ roomInfo, isOpen, setIsOpen }: SideMenuProps) => {
isOpen={isOpenCallTaxi}
onChangeIsOpen={setIsOpenCallTaxi}
/>
<ModalChatReport
roomInfo={roomInfo}
isOpen={isOpenReport}
onChangeIsOpen={setIsOpenReport}
/>
</>
);
};
Expand Down
116 changes: 0 additions & 116 deletions src/components/Chat/MessageForm/Popup/PopupAccount.tsx

This file was deleted.

Loading

0 comments on commit a4b8d4b

Please sign in to comment.