Move SessionLoginPage to react-rails
This commit is contained in:
		
							parent
							
								
									7b171a97ac
								
							
						
					
					
						commit
						a3f68d7a15
					
				
					 4 changed files with 13 additions and 21 deletions
				
			
		
							
								
								
									
										11
									
								
								app/javascript/components/SessionLoginPage.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								app/javascript/components/SessionLoginPage.js
									
										
									
									
									
										Normal 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 | ||||||
|  | @ -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 |  | ||||||
|  | @ -1,3 +0,0 @@ | ||||||
| // License: LGPL-3.0-or-later
 |  | ||||||
| require('bootstrap-loader'); |  | ||||||
| require('../legacy_react/app/session_login_page') |  | ||||||
|  | @ -2,12 +2,10 @@ | ||||||
| # Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE -%> | # Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE -%> | ||||||
| <% content_for :title, t("login.header") %> | <% content_for :title, t("login.header") %> | ||||||
| <% content_for :javascripts do %> | <% content_for :javascripts do %> | ||||||
|   <%= javascript_pack_tag 'i18n', 'session_login_page' %> |   <%= javascript_pack_tag 'i18n', 'application' %> | ||||||
| <% end %> | <% end %> | ||||||
| <% content_for :stylesheets do %> | <% content_for :stylesheets do %> | ||||||
|   <%= stylesheet_link_tag 'users/page' %> |   <%= stylesheet_link_tag 'users/page' %> | ||||||
| <% end %> | <% end %> | ||||||
| 
 | 
 | ||||||
| <div id="outlet"></div> | <%= react_component('SessionLoginPage', {}) %> | ||||||
| 
 |  | ||||||
| <script>LoadReactPage(document.getElementById('outlet'))</script> |  | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Eric
						Eric