mirror of
https://github.com/symfony/recipes.git
synced 2026-09-16 09:36:24 +03:00
Update Flex endpoint
This commit is contained in:
@@ -23,18 +23,15 @@
|
||||
]
|
||||
},
|
||||
"files": {
|
||||
"templates/admin.html.twig": {
|
||||
"assets/js/admin.js": {
|
||||
"contents": [
|
||||
"{% extends 'base.html.twig' %}",
|
||||
"import React from 'react';",
|
||||
"import ReactDOM from 'react-dom';",
|
||||
"import { HydraAdmin } from '@api-platform/admin';",
|
||||
"",
|
||||
"{% block title %}API Platform Admin{% endblock %}",
|
||||
"const entrypoint = document.getElementById('api-entrypoint').innerText;",
|
||||
"",
|
||||
"{% block body %}<div id=\"api-platform-admin\"></div>{% endblock %}",
|
||||
"",
|
||||
"{% block javascripts %}",
|
||||
" <script type=\"text/plain\" id=\"api-entrypoint\">{{ path('api_entrypoint') }}</script>",
|
||||
" {{ encore_entry_script_tags('admin') }}",
|
||||
"{% endblock %}",
|
||||
"ReactDOM.render(<HydraAdmin entrypoint={entrypoint}/>, document.getElementById('api-platform-admin'));",
|
||||
""
|
||||
],
|
||||
"executable": false
|
||||
@@ -50,15 +47,18 @@
|
||||
],
|
||||
"executable": false
|
||||
},
|
||||
"assets/js/admin.js": {
|
||||
"templates/admin.html.twig": {
|
||||
"contents": [
|
||||
"import React from 'react';",
|
||||
"import ReactDOM from 'react-dom';",
|
||||
"import { HydraAdmin } from '@api-platform/admin';",
|
||||
"{% extends 'base.html.twig' %}",
|
||||
"",
|
||||
"const entrypoint = document.getElementById('api-entrypoint').innerText;",
|
||||
"{% block title %}API Platform Admin{% endblock %}",
|
||||
"",
|
||||
"ReactDOM.render(<HydraAdmin entrypoint={entrypoint}/>, document.getElementById('api-platform-admin'));",
|
||||
"{% block body %}<div id=\"api-platform-admin\"></div>{% endblock %}",
|
||||
"",
|
||||
"{% block javascripts %}",
|
||||
" <script type=\"text/plain\" id=\"api-entrypoint\">{{ path('api_entrypoint') }}</script>",
|
||||
" {{ encore_entry_script_tags('admin') }}",
|
||||
"{% endblock %}",
|
||||
""
|
||||
],
|
||||
"executable": false
|
||||
|
||||
Reference in New Issue
Block a user