Get initial implementation for react working

This commit is contained in:
Dane Everitt 2019-06-09 17:29:10 -07:00
parent 37715762cd
commit 3f2a4b5762
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
8 changed files with 344 additions and 422 deletions

View file

@ -1,18 +0,0 @@
<html>
<head>
<title>Pterodactyl Dev</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
</head>
<body>
<div id="pterodactyl">
<router-view></router-view>
<div class="w-full m-auto mt-0 container">
<p class="text-right text-neutral-600 text-xs">
</p>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,12 @@
import * as React from 'react';
import { hot } from 'react-hot-loader/root';
class App extends React.PureComponent {
render () {
return (
<h1>Hello</h1>
);
}
}
export default hot(App);

View file

@ -0,0 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import App from "@/components/App";
ReactDOM.render(<App/>, document.getElementById('app'));

View file

@ -35,15 +35,13 @@
<body class="{{ $css['body'] ?? 'bg-neutral-50' }}">
@section('content')
@yield('above-container')
<div id="pterodactyl" class="flex flex-col">
<div id="app" class="flex flex-col">
@yield('container')
</div>
@yield('below-container')
@show
@section('scripts')
{!! $asset->js('main.js') !!}
{!! $asset->js('vendor.js') !!}
{!! $asset->js('locales.js') !!}
@show
</body>
</html>