Skip to content

Commit

Permalink
Merge pull request #761 from Samfundet/760-upgrade-react-markdown
Browse files Browse the repository at this point in the history
Upgrade react-markdown.
  • Loading branch information
emilte authored Oct 13, 2023
2 parents aa60074 + dd72442 commit bfbc40d
Show file tree
Hide file tree
Showing 6 changed files with 329 additions and 322 deletions.
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"react-dom": "^18",
"react-helmet-async": "^1",
"react-loading-skeleton": "^3",
"react-markdown": "^8",
"react-markdown": "^9",
"react-modal": "^3",
"react-refresh": "^0",
"react-router-dom": "^6",
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/Components/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Icon } from '@iconify/react';
import { default as classNames, default as classnames } from 'classnames';
import { ChangeEvent } from 'react';
import { ReactElement } from 'react-markdown/lib/react-markdown';
import { ChangeEvent, ReactElement } from 'react';
import styles from './Dropdown.module.scss';

export type DropDownOption<T> = {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/Components/SamfMarkdown/SamfMarkdown.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReactMarkdown } from 'react-markdown/lib/react-markdown';
import Markdown from 'react-markdown';
import styles from './SamfMarkdown.module.scss';

type SamfMarkdownProps = {
Expand All @@ -9,7 +9,7 @@ type SamfMarkdownProps = {
export function SamfMarkdown({ children = '' }: SamfMarkdownProps) {
return (
<div className={styles.samf_markdown}>
<ReactMarkdown>{children}</ReactMarkdown>
<Markdown>{children}</Markdown>
</div>
);
}
2 changes: 1 addition & 1 deletion frontend/src/Forms/SamfFormFieldTypes.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReactElement } from 'react-markdown/lib/react-markdown';
import { ReactElement } from 'react';
import { Checkbox, Dropdown, InputField, TextAreaField } from '~/Components';
import { DropDownOption } from '~/Components/Dropdown/Dropdown';
import { ImagePicker } from '~/Components/ImagePicker/ImagePicker';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { Button, ImageCard } from '~/Components';
import { Icon } from '@iconify/react';
import classNames from 'classnames';
import { t } from 'i18next';
import { useState } from 'react';
import { ReactElement } from 'react-markdown/lib/react-markdown';
import { ReactElement, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { toast } from 'react-toastify';
import { DropDownOption } from '~/Components/Dropdown/Dropdown';
Expand Down
Loading

0 comments on commit bfbc40d

Please sign in to comment.