Files
outline/app/embeds/GoogleSlides.js
Tom Moor 4baf5ce99a test: Google embeds (#1202)
Update slides to only embed pub links
2020-03-07 10:10:26 -08:00

26 lines
476 B
JavaScript

// @flow
import * as React from 'react';
import Frame from './components/Frame';
const URL_REGEX = new RegExp(
'^https?://docs.google.com/presentation/d/(.*)/pub(.*)$'
);
type Props = {
url: string,
};
export default class GoogleSlides extends React.Component<Props> {
static ENABLED = [URL_REGEX];
render() {
return (
<Frame
src={this.props.url.replace('/pub', '/embed')}
title="Google Slides Embed"
border
/>
);
}
}