Move RegistrationPage to react-rails
This commit is contained in:
		
							parent
							
								
									6c492bb202
								
							
						
					
					
						commit
						7b171a97ac
					
				
					 4 changed files with 13 additions and 23 deletions
				
			
		
							
								
								
									
										11
									
								
								app/javascript/components/RegistrationPage.tsx
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								app/javascript/components/RegistrationPage.tsx
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,11 @@ | |||
| import React from "react" | ||||
| require('bootstrap-loader'); | ||||
| import Root from "../legacy_react/src/components/common/Root" | ||||
| import RegPage from "../legacy_react/src/components/registration_page/RegistrationPage" | ||||
| 
 | ||||
| 
 | ||||
| function RegistrationPage(props:{}){ | ||||
|   return (<Root><RegPage/></Root>) | ||||
| } | ||||
| 
 | ||||
| export default RegistrationPage | ||||
|  | @ -1,16 +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 RegistrationPage from "../src/components/registration_page/RegistrationPage" | ||||
| 
 | ||||
| import * as ReactDOM from 'react-dom' | ||||
| import * as React from 'react' | ||||
| 
 | ||||
| function LoadReactPage(element:HTMLElement) { | ||||
|   ReactDOM.render(<Root><RegistrationPage/></Root>, element) | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| (window as any).LoadReactPage = LoadReactPage | ||||
| 
 | ||||
|  | @ -1,4 +0,0 @@ | |||
| // License: LGPL-3.0-or-later
 | ||||
| require('bootstrap-loader'); | ||||
| require('../legacy_react/app/registration_page') | ||||
| 
 | ||||
|  | @ -1,8 +1,7 @@ | |||
| <% content_for :title, t("registration.get_started.header") %> | ||||
| <% content_for :javascripts do %> | ||||
|   <%= javascript_pack_tag 'loading_indicator', 'i18n', 'registration_page' %> | ||||
|   <%= javascript_pack_tag 'loading_indicator', 'i18n', 'application' %> | ||||
| <% end %> | ||||
| 
 | ||||
| <div id="outlet"></div> | ||||
| <%= react_component('RegistrationPage', {}) %> | ||||
| 
 | ||||
| <script>LoadReactPage(document.getElementById('outlet'))</script> | ||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Eric
						Eric