Skip to content

Commit 02153e8

Browse files
committed
refactor: 💡 stop using deprecated React.SFC
1 parent b8383d1 commit 02153e8

File tree

10 files changed

+10
-10
lines changed

10 files changed

+10
-10
lines changed

‎src/blocks/figma/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const blockClass = rule({
1818
},
1919
});
2020

21-
const Figma: React.SFC<BlockProps> = ({url, renderWrap}) => {
21+
const Figma: React.FC<BlockProps> = ({url, renderWrap}) => {
2222
return renderWrap(
2323
<div className={blockClass}>
2424
<iframe src={`https://www.figma.com/embed?embed_host=share&url=${encodeURIComponent(url)}`} allowFullScreen />

‎src/blocks/gfycat/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import {BlockProps} from '../..';
33

4-
const Gfycat: React.SFC<BlockProps> = ({id, renderWrap}) => {
4+
const Gfycat: React.FC<BlockProps> = ({id, renderWrap}) => {
55
return renderWrap(
66
<iframe
77
src={`https://gfycat.com/ifr/${id}`}

‎src/blocks/gmaps/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const blockClass = rule({
1919

2020
const latlngRegex = /@([\-0-9\.]+),([\-0-9\.]+)(?:[^\-0-9\.]|$)/;
2121

22-
const Gmaps: React.SFC<BlockProps> = ({url, renderWrap, renderVoid}) => {
22+
const Gmaps: React.FC<BlockProps> = ({url, renderWrap, renderVoid}) => {
2323
const matches = url.match(latlngRegex);
2424
if (!matches) return renderVoid();
2525

‎src/blocks/instagram/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react';
22
import {BlockProps} from '../..';
33
import InstagramEmbed from 'react-instagram-embed';
44

5-
const Instagram: React.SFC<BlockProps> = ({url, renderWrap}) => {
5+
const Instagram: React.FC<BlockProps> = ({url, renderWrap}) => {
66
return renderWrap(
77
<InstagramEmbed
88
url={url}

‎src/blocks/jsfiddle/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const blockClass = rule({
1818
},
1919
});
2020

21-
const JsFiddle: React.SFC<BlockProps> = ({id, renderWrap}) => {
21+
const JsFiddle: React.FC<BlockProps> = ({id, renderWrap}) => {
2222
return renderWrap(
2323
<div className={blockClass}>
2424
<div>

‎src/blocks/react-player/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const style = {
66
maxWidth: '100%',
77
};
88

9-
const ReactPlayerWrapper: React.SFC<BlockProps> = ({url, renderWrap}) => {
9+
const ReactPlayerWrapper: React.FC<BlockProps> = ({url, renderWrap}) => {
1010
return renderWrap(<ReactPlayer url={url} style={style} controls={true} volume={1} />);
1111
};
1212

‎src/blocks/replit/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import {BlockProps} from '../..';
33

4-
const Replit: React.SFC<BlockProps> = ({id, renderWrap}) => {
4+
const Replit: React.FC<BlockProps> = ({id, renderWrap}) => {
55
return renderWrap(
66
<iframe
77
height="700px"

‎src/blocks/soundcloud/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface SoundCloudProps extends BlockProps {
1010
isVisual?: boolean;
1111
}
1212

13-
const SoundCloud: React.SFC<SoundCloudProps> = ({
13+
const SoundCloud: React.FC<SoundCloudProps> = ({
1414
url,
1515
autoplay,
1616
hideRelated,

‎src/blocks/vimeo/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react';
22
import {BlockProps} from '../..';
33
import ReactPlayer from 'react-player';
44

5-
const Vimeo: React.SFC<BlockProps> = ({url, renderWrap}) => {
5+
const Vimeo: React.FC<BlockProps> = ({url, renderWrap}) => {
66
return renderWrap(<ReactPlayer url={url} />);
77
};
88

‎src/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export * from './ReactEmbed';
55

66
const Resource = React.lazy(() => import('./ReactEmbed') as any);
77

8-
const Embed: React.SFC<ReactEmbedProps> = (props) => {
8+
const Embed: React.FC<ReactEmbedProps> = (props) => {
99
return (
1010
<React.Suspense fallback={props.fallback || null}>
1111
<Resource {...props} />

0 commit comments

Comments
 (0)