diff --git a/shared/editor/embeds/Bilibili.tsx b/shared/editor/embeds/Bilibili.tsx index 06d8ecd9f..ba7867636 100644 --- a/shared/editor/embeds/Bilibili.tsx +++ b/shared/editor/embeds/Bilibili.tsx @@ -4,18 +4,16 @@ import { EmbedProps as Props } from "."; const URL_REGEX = /(?:https?:\/\/)?(www\.bilibili\.com)\/video\/([\w\d]+)?(\?\S+)?/i; -export default class Vimeo extends React.Component { - static ENABLED = [URL_REGEX]; - - render() { - const { matches } = this.props.attrs; - const videoId = matches[2]; - return ( - - ); - } +export default function Bilibili(props: Props) { + const { matches } = props.attrs; + const videoId = matches[2]; + return ( + + ); } + +Bilibili.ENABLED = [URL_REGEX];