Skip to content

Commit

Permalink
FeaturePanel: add nl2br helper for description FeaturedTag (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
zbycz authored Oct 11, 2024
1 parent 94d43a0 commit b83b954
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/FeaturePanel/FeaturedTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { WikidataRenderer } from './renderers/WikidataRenderer';
import { isDesktopResolution } from '../helpers';
import { ClimbingRenderer } from './renderers/ClimbingRenderer';
import { gradeSystemKeys } from './Climbing/utils/grades/gradeSystem';
import { nl2br } from '../utils/nl2br';

const Wrapper = styled.div`
position: relative;
Expand Down Expand Up @@ -46,7 +47,7 @@ type Renderers = {
[key: string]: React.FC<{ k: string; v: string }>;
};

const DefaultRenderer = ({ v }) => v;
const DefaultRenderer = ({ v }) => <>{nl2br(v)}</>;

const climbingRenderers = gradeSystemKeys.reduce(
(acc, gradeSystemKey) => ({
Expand Down

0 comments on commit b83b954

Please sign in to comment.