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

fix(web-domains): handWavingStatus 추가로 인한 isHandWaving 삭제 #222

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
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
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@
<br />
<br />

## 🛠️ Tech Stack

<img src="https://github.com/user-attachments/assets/0a8b39ab-fe30-4f97-abf0-20695fc15ff8" alt="tech stack" width="600" />

<br />
<br />
<br />


## 🛋️ Members

| FE | FE | FE | FE |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Icon, Txt, fontWeightVariants } from '@sambad/sds/components';
import { colors, borderRadiusVariants } from '@sambad/sds/theme';
import { borderRadiusVariants, colors } from '@sambad/sds/theme';
import { HTMLAttributes, forwardRef, useState } from 'react';

interface CommentInputProps extends Omit<HTMLAttributes<HTMLInputElement>, 'onChange'> {
Expand Down Expand Up @@ -32,7 +32,7 @@ export const CommentInput = forwardRef<HTMLInputElement, CommentInputProps>(
width: '100%',
height: '48px',
borderRadius: borderRadiusVariants.medium,
padding: '12px 16px',
padding: '12px 40px 12px 16px',
'::placeholder': {
fontSize: '16px',
fontWeight: fontWeightVariants.regular,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import { ProgressingQuestionContainerSkeleton } from '../components/Skeleton/Pro
import { useProgressingQuestionService } from '../services/useProgressingQuestionService';

export const ProgressingQuestionContainer = () => {
const { progressingQuestion, meetingId, isLoading } = useProgressingQuestionService();
const { progressingQuestion, meetingId, isFetching } = useProgressingQuestionService();

const isNowAnswered = !progressingQuestion?.isAnswered;

if (isLoading) return <ProgressingQuestionContainerSkeleton />;
if (isFetching) return <ProgressingQuestionContainerSkeleton />;

if (!progressingQuestion) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,26 @@ export const useProgressingQuestionService = () => {
},
});

const { data: progressingQuestion, isLoading } = useGetProgressingQuestion({
const { data: progressingQuestion, isFetching } = useGetProgressingQuestion({
params: { meetingId: parseInt(meetingId) },
options: {
select: (data) => {
if (data?.startTime) {
setAnswerGlobalTime(dayjs(data.startTime).valueOf());
}
return data;
},
enabled: !!meetingId,
},
});

useEffect(() => {
if (progressingQuestion?.startTime) {
setAnswerGlobalTime(dayjs(progressingQuestion.startTime).valueOf());
}
}, [progressingQuestion]);

useEffect(() => {
mutateAsync({ meetingId: parseInt(meetingId) });
}, []);

return {
meetingId,
isLoading,
isFetching,
gatherName: '삼봤드의 모험',
progressingQuestion,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ export type NotificationType = {
eventType: NotificationEventType;
};

export type NotificationEventType = 'QUESTION_REGISTERED' | 'TARGET_MEMBER' | 'HAND_WAVING_REQUESTED';
export type NotificationEventType =
| 'QUESTION_REGISTERED'
| 'TARGET_MEMBER'
| 'HAND_WAVING_REQUESTED'
| 'HAND_WAVING_REJECTED'
| 'HAND_WAVING_ACCEPTED';

export type NotificationResponseType =
| {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export type MemberType = {
name: string;
profileImageFileUrl?: string;
role: 'OWNER' | 'ADMIN' | 'MEMBER';
isHandWaved: boolean;
isMe: boolean;
handWavingStatus: HandWavingStatusType;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface GatherMemberProfileProps {
}

export const GatherMemberProfile = ({ meetingId, member }: GatherMemberProfileProps) => {
const { name, role, profileImageFileUrl, meetingMemberId, isHandWaved, isMe, handWavingStatus } = member;
const { name, role, profileImageFileUrl, meetingMemberId, isMe, handWavingStatus } = member;
const isOwner = role === 'OWNER';

return (
Expand All @@ -27,12 +27,7 @@ export const GatherMemberProfile = ({ meetingId, member }: GatherMemberProfilePr
>
<Link href={isMe ? '/home/me' : `${meetingId}/about/${meetingMemberId}`}>
<div css={{ alignItems: 'center', display: 'flex', flexDirection: 'column' }}>
<ProfileImage
imageUrl={profileImageFileUrl}
isConnection={isHandWaved}
isOnwer={isOwner}
handWavingStatus={handWavingStatus}
/>
<ProfileImage imageUrl={profileImageFileUrl} isOnwer={isOwner} handWavingStatus={handWavingStatus} />
<Txt typography="title2" css={{ marginTop: '12px' }}>
{isMe ? '나' : name}
</Txt>
Expand All @@ -44,13 +39,12 @@ export const GatherMemberProfile = ({ meetingId, member }: GatherMemberProfilePr

interface ProfileImageProps {
imageUrl?: string;
isConnection?: boolean;
isOnwer?: boolean;
handWavingStatus: HandWavingStatusType;
}

const ProfileImage = ({ imageUrl, isConnection = false, isOnwer = false, handWavingStatus }: ProfileImageProps) => {
const isHandWaving = isConnection || handWavingStatus === 'REQUESTED' || handWavingStatus === 'ACCEPTED';
const ProfileImage = ({ imageUrl, isOnwer = false, handWavingStatus }: ProfileImageProps) => {
const isHandWaving = handWavingStatus === 'REQUESTED' || handWavingStatus === 'ACCEPTED';

const color = handWavingStatus === 'ACCEPTED' ? colors.primary500 : colors.grey500;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useAtomValue } from 'jotai';
import { debounce } from 'lodash-es';
import { useEffect, useState } from 'react';

import { getWebDomain } from '@/common';
Expand Down Expand Up @@ -64,13 +63,7 @@ export const useGatherMemberProfileListService = () => {
}, [data]);

useEffect(() => {
let filter;
filter = debounce(handleChangeGatherMemberList, 300);
filter(searchInput);

return () => {
filter = null;
};
handleChangeGatherMemberList(searchInput);
}, [searchInput]);

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ export const AlarmListContainer = () => {
/>
);
}

case 'HAND_WAVING_ACCEPTED':
case 'HAND_WAVING_REJECTED':
case 'QUESTION_REGISTERED':
case 'TARGET_MEMBER':
return <NotificationItem.AlarmItem alarm={notification} />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export const useModifyUserInfo = ({ options }: Args) => {

async function modifyUserInfo(params: Params): Promise<MeetingMemberResponse> {
const { meetingId, ...restParams } = params;
console.log(restParams);
const data = await Http.PATCH<Params, MeetingMemberResponse>(`/v1/meetings/${meetingId}/members/me`, restParams);
return data;
}
Loading