PluginProbe
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz / 0.0.3
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz v0.0.3
2.12.6 2.12.5 2.12.4 2.12.3 2.12.2 2.12.1 2.12.0 2.11.1 2.11.0 2.10.1 2.10.0 2.9.1 2.9.0 2.8.2 2.8.1 2.7.0 2.7.1 2.8.0 trunk 0.0.10 0.0.11 0.0.12 0.0.13 0.0.2 0.0.3 All 96 releases
sureforms / src / admin / settings / settings.js
settings.js
43 lines 910 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { render } from '@wordpress/element';
2 import { BrowserRouter as Router, useLocation } from 'react-router-dom';
3
4 import Header from './Header';
5 import Navigation from './Navigation';
6 import Component from './Component';
7 import './styles.scss';
8
9 function useQuery() {
10 return new URLSearchParams( useLocation().search );
11 }
12
13 function QueryScreen() {
14 const query = useQuery();
15 return <Component path={ query.get( 'tab' ) } />;
16 }
17
18 const Settings = () => {
19 return (
20 <Router>
21 <Header />
22 <div className="srfm-flex srfm-flex-row srfm-h-[100vh] srfm-bg-transparent">
23 <Navigation />
24 <QueryScreen />
25 </div>
26 </Router>
27 );
28 };
29
30 export default Settings;
31
32 ( function () {
33 const app = document.getElementById( 'srfm-settings-container' );
34
35 function renderApp() {
36 if ( null !== app ) {
37 render( <Settings />, app );
38 }
39 }
40
41 document.addEventListener( 'DOMContentLoaded', renderApp );
42 }() );
43