Skip to content

Commit 088b590

Browse files
committed
Update ProgramFeedCard.component.jsx
1 parent 30a6ea9 commit 088b590

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

frontend/src/components/ProgramFeedCard.component.jsx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,9 @@ function ProgramFeedCard({
355355
},
356356
}}
357357
>
358-
<Flex gap={2} width="full">
358+
<Flex gap={2} width="full"
359+
marginBottom={2}
360+
>
359361
<Tooltip
360362
label={
361363
user && program.trainer === user.username ? null : (
@@ -408,17 +410,22 @@ function ProgramFeedCard({
408410
>
409411
Start Practicing
410412
</Button>
411-
<Button
412-
variant='outline'
413-
colorScheme='purple'
414-
leftIcon={<ChatIcon />}
415-
onClick={() => onFeedbackOpen()}
416-
>
417-
Give Feedback
418-
</Button>
419413
</Flex>
420414
)}
421415
</Flex>
416+
{
417+
isUserJoined && user && program.trainer !== user.username && (
418+
<Button
419+
variant='outline'
420+
colorScheme='purple'
421+
leftIcon={<ChatIcon />}
422+
onClick={() => onFeedbackOpen()}
423+
width={"full"}
424+
>
425+
Give Feedback
426+
</Button>
427+
)
428+
}
422429
</CardFooter>
423430
</Card>
424431
<FeedbackModal

0 commit comments

Comments
 (0)