Skip to content

Commit

Permalink
fix: 질문 시작하기 버튼 링크
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrevile committed Aug 26, 2024
1 parent 47141ac commit c1ccbc0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ import { colors, size } from '@sambad/sds/theme';
import Link from 'next/link';
import { HTMLAttributes } from 'react';

export const StartRelayQuestionButton = ({ ...rest }: HTMLAttributes<HTMLButtonElement>) => {
interface StartRelayQuestionButtonProps extends HTMLAttributes<HTMLButtonElement> {
meetingId?: number;
}

export const StartRelayQuestionButton = ({ meetingId, ...rest }: StartRelayQuestionButtonProps) => {
return (
// <Link href={`${currentMeeting?.meetingId}/start-relay-question`}>
<Link href="/start-relay-question">
<Link href={`${meetingId}/start-relay-question`}>
<Button css={{ height: size['3xl'] }} {...rest}>
<Txt typography="subtitle1" color={colors.white}>
릴레이 질문 시작하기
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { StartRelayQuestionButton } from '../components/StartRelayQuestionButton
import { useFloatingButtonService } from '../services/useFloatingButtonService';

export const FloatingButtonContainer = () => {
const { buttonType, homeGlobalTime, handleClose, isOpen, open } = useFloatingButtonService();
const { buttonType, homeGlobalTime, handleClose, isOpen, open, meetingId } = useFloatingButtonService();

return (
<div
Expand All @@ -19,7 +19,7 @@ export const FloatingButtonContainer = () => {
padding: '0 20px',
}}
>
{buttonType === 'start' && <StartRelayQuestionButton />}
{buttonType === 'start' && <StartRelayQuestionButton meetingId={meetingId} />}
{buttonType === 'countdown' && <AlreadyProgressingQuestionButton time={homeGlobalTime} onClick={open} />}
<ProgressingQuestionModal isOpen={isOpen} time={homeGlobalTime} onClose={handleClose} />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,12 @@ export const useFloatingButtonService = () => {
close();
};

// const handleClickRelayStartButton = () => {
// if (isProgessingQuestion) {
// open();
// return;
// }
// push(`${currentMeeting?.meetingId}/start-relay-question`);
// };

return {
meetingId: currentMeeting?.meetingId,
isOpen,
buttonType,
homeGlobalTime: homeGlobalTime ?? 0,
open,
handleClose,
// handleClickRelayStartButton,
};
};

0 comments on commit c1ccbc0

Please sign in to comment.