Skip to content
Merged
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
7 changes: 3 additions & 4 deletions src/apps/opportunities/src/components/ChallengeForum.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -370,22 +370,22 @@ const ParticipantGroup: FC<{

interface ForumFallbackProps {
externalUrl?: string
text: string
text?: string
title: string
}

/**
* Preserves a safe recovery path when embedded API access is unavailable.
*
* @param props fallback copy and optional legacy destination.
* @param props fallback title, optional description, and optional legacy destination.
* @returns forum fallback state.
* @throws Does not throw.
*/
const ForumFallback: FC<ForumFallbackProps> = props => (
<div className={styles.fallback}>
<IconOutline.ChatAlt2Icon aria-hidden='true' />
<h2>{props.title}</h2>
<p>{props.text}</p>
{props.text && <p>{props.text}</p>}
{props.externalUrl && (
<a href={props.externalUrl} rel='noreferrer' target='_blank'>
Open legacy forum
Expand Down Expand Up @@ -1798,7 +1798,6 @@ export const ChallengeForum: FC<ChallengeForumProps> = props => {
return (
<ForumFallback
externalUrl={externalUrl}
text='The embedded discussion could not be loaded. No communication action was attempted.'
title='Forum temporarily unavailable'
/>
)
Expand Down
Loading