mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 23:03:45 +02:00
Get initial implementation for react working
This commit is contained in:
@@ -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>
|
||||
12
resources/scripts/components/App.tsx
Normal file
12
resources/scripts/components/App.tsx
Normal 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);
|
||||
5
resources/scripts/index.tsx
Normal file
5
resources/scripts/index.tsx
Normal 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'));
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user