]> cat aescling's git repositories - mastodon.git/blob - app/javascript/packs/share.js
Add protocol handler. Handle follow intents (#4511)
[mastodon.git] / app / javascript / packs / share.js
1 import loadPolyfills from '../mastodon/load_polyfills';
2
3 require.context('../images/', true);
4
5 function loaded() {
6 const ComposeContainer = require('../mastodon/containers/compose_container').default;
7 const React = require('react');
8 const ReactDOM = require('react-dom');
9 const mountNode = document.getElementById('mastodon-compose');
10
11 if (mountNode !== null) {
12 const props = JSON.parse(mountNode.getAttribute('data-props'));
13 ReactDOM.render(<ComposeContainer {...props} />, mountNode);
14 }
15 }
16
17 function main() {
18 const ready = require('../mastodon/ready').default;
19 ready(loaded);
20 }
21
22 loadPolyfills().then(main).catch(error => {
23 console.error(error);
24 });
This page took 0.082578 seconds and 4 git commands to generate.