X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fapp.js;h=c2de14124e8f402b21889e4e2f05709d21007582;hb=6bc8cf8ce3ddc1592c56d2d414a5b9b7215eff6d;hp=40c55f65c25644d4f09d3c734b219a2aa736b134;hpb=4bf2dd1dd1f6d31b2ebe299b7495a8b0e259ec77;p=alttp.git diff --git a/resources/js/app.js b/resources/js/app.js index 40c55f6..c2de141 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -1 +1,30 @@ -require('./bootstrap'); +/** + * First we will load all of this project's JavaScript dependencies which + * includes React and other helpers. It's a great starting point while + * building robust, powerful web applications using React + Laravel. + */ + +import './bootstrap'; + +import React from 'react'; +import ReactDOM from 'react-dom'; + +import toastr from 'toastr'; +toastr.options.positionClass = 'toast-bottom-right'; + +/** + * Next, we will create a fresh React component instance and attach it to + * the page. Then, you may begin adding components to this application + * or customize the JavaScript scaffolding to fit your unique needs. + */ + +import AosApp from './components/aos/App'; +import App from './components/app'; + +if (document.getElementById('aos-root')) { + ReactDOM.render(, document.getElementById('aos-root')); +} + +if (document.getElementById('react-root')) { + ReactDOM.render(, document.getElementById('react-root')); +}