Skip to content

Commit

Permalink
reverting change to hard code as getting an error when redoing the qu…
Browse files Browse the repository at this point in the history
…iz when using Typescript enum values.
  • Loading branch information
epixieme committed May 13, 2024
1 parent 9633bf1 commit 0466ece
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/features/conversations/components/ConversationRating.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { CmButton, CmTypography } from 'shared/components';
import useApiClient from 'shared/hooks/useApiClient';
import { useUpdateConversation } from '../hooks';
import { useState } from 'react';
import { TConversationState } from 'types/Conversation';

interface Props {
conversationId: string;
Expand All @@ -17,7 +16,7 @@ function ConversationRating({ conversationId, conversationState, initialRating }

function submitRating(newRating: number) {
setRating(newRating);
if (conversationState === TConversationState.Talked) updateConversation(conversationId, { state: 5 });
if (conversationState === 4) updateConversation(conversationId, { state: 5 });

apiClient.putSingleConversation({
conversationId,
Expand Down

0 comments on commit 0466ece

Please sign in to comment.