Move SessionLoginPage to react-rails

This commit is contained in:
Eric 2020-06-22 18:20:29 -05:00 committed by Eric Schultz
parent 7b171a97ac
commit a3f68d7a15
4 changed files with 13 additions and 21 deletions

View file

@ -0,0 +1,11 @@
import React from "react"
require('bootstrap-loader');
import Root from "../legacy_react/src/components/common/Root"
import SessionLogPage from "../legacy_react/src/components/session_login_page/SessionLoginPage"
function SessionLoginPage(props:{}){
return (<Root><SessionLogPage/></Root>)
}
export default SessionLoginPage

View file

@ -1,14 +0,0 @@
// License: LGPL-3.0-or-later
// require a root component here. This will be treated as the root of a webpack package
import Root from "../src/components/common/Root"
import SessionLoginPage from "../src/components/session_login_page/SessionLoginPage"
import * as ReactDOM from 'react-dom'
import * as React from 'react'
function LoadReactPage(element:HTMLElement) {
ReactDOM.render(<Root><SessionLoginPage/></Root>, element)
}
(window as any).LoadReactPage = LoadReactPage

View file

@ -1,3 +0,0 @@
// License: LGPL-3.0-or-later
require('bootstrap-loader');
require('../legacy_react/app/session_login_page')

View file

@ -2,12 +2,10 @@
# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE -%>
<% content_for :title, t("login.header") %>
<% content_for :javascripts do %>
<%= javascript_pack_tag 'i18n', 'session_login_page' %>
<%= javascript_pack_tag 'i18n', 'application' %>
<% end %>
<% content_for :stylesheets do %>
<%= stylesheet_link_tag 'users/page' %>
<% end %>
<div id="outlet"></div>
<script>LoadReactPage(document.getElementById('outlet'))</script>
<%= react_component('SessionLoginPage', {}) %>