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: remove custom activity badge #9812

Merged
merged 1 commit into from
Jun 4, 2024
Merged
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
8 changes: 2 additions & 6 deletions packages/client/components/ActivityLibrary/ActivityCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,13 @@ export interface ActivityCardProps {
className?: string
theme: CardTheme
title?: string
badge?: React.ReactNode
children?: React.ReactNode
type?: MeetingTypeEnum
templateRef?: ActivityCard_template$key
}

export const ActivityCard = (props: ActivityCardProps) => {
const {className, theme, title, children, type, badge, templateRef} = props
const {className, theme, title, children, type, templateRef} = props
const category = type && MEETING_TYPE_TO_CATEGORY[type]
const [showTooltip, setShowTooltip] = useState(false)
const hoverTimeout = useRef<NodeJS.Timeout | null>(null)
Expand Down Expand Up @@ -105,10 +104,7 @@ export const ActivityCard = (props: ActivityCardProps) => {
className
)}
>
<div className='flex-1'>
{children}
<div className='absolute bottom-0 right-0'>{badge}</div>
</div>
<div className='flex-1'>{children}</div>
{template && (
<Tooltip open={showTooltip}>
<TooltipTrigger asChild>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ const ActivityDetails = (props: Props) => {
<ActivityCard
className='mb-8 w-80 max-md:hidden sm:ml-14 xl:ml-0 xl:mb-0'
theme={CATEGORY_THEMES[category as CategoryID]}
badge={null}
type={type}
>
<ActivityCardImage src={illustrationUrl} category={category as CategoryID} />
Expand Down
6 changes: 0 additions & 6 deletions packages/client/components/ActivityLibrary/ActivityGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import React from 'react'
import {useFragment} from 'react-relay'
import {Link} from 'react-router-dom'
import {ActivityGrid_user$key} from '../../__generated__/ActivityGrid_user.graphql'
import {ActivityBadge} from './ActivityBadge'
import {ActivityCard, ActivityCardImage} from './ActivityCard'
import ActivityCardFavorite from './ActivityCardFavorite'
import {Template} from './ActivityLibrary'
Expand Down Expand Up @@ -45,11 +44,6 @@ const ActivityGrid = (props: ActivityGridProps) => {
title={template.name}
type={template.type}
templateRef={template}
badge={
template.scope !== 'PUBLIC' ? (
<ActivityBadge className='m-2 bg-gold-300 text-grape-700'>Custom</ActivityBadge>
) : null
}
>
<ActivityCardImage
className='group-hover/card:hidden'
Expand Down
7 changes: 0 additions & 7 deletions packages/client/components/RetroDrawerTemplateCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import useAtmosphere from '../hooks/useAtmosphere'
import useMutationProps from '../hooks/useMutationProps'
import UpdateMeetingTemplateMutation from '../mutations/UpdateMeetingTemplateMutation'
import {CATEGORY_THEMES, CategoryID} from '././ActivityLibrary/Categories'
import {ActivityBadge} from './ActivityLibrary/ActivityBadge'
import {ActivityCard, ActivityCardImage} from './ActivityLibrary/ActivityCard'
import {ActivityLibraryCardDescription} from './ActivityLibrary/ActivityLibraryCardDescription'

Expand All @@ -28,7 +27,6 @@ const RetroDrawerTemplateCard = (props: Props) => {
name
category
illustrationUrl
scope
}
`,
templateRef
Expand All @@ -54,11 +52,6 @@ const RetroDrawerTemplateCard = (props: Props) => {
theme={CATEGORY_THEMES[template.category as CategoryID]}
title={template.name}
type='retrospective'
badge={
template.scope !== 'PUBLIC' ? (
<ActivityBadge className='m-2 bg-gold-300 text-grape-700'>Custom</ActivityBadge>
) : null
}
>
<ActivityCardImage
className='group-hover/card:hidden'
Expand Down
Loading