update react hook form example,

This commit is contained in:
louiscklaw
2025-06-06 22:27:14 +08:00
parent b2adcff61b
commit beb1e0ae68
5 changed files with 229 additions and 13 deletions

View File

@@ -1,30 +1,31 @@
import { IonIcon, IonLabel, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from '@ionic/react';
import { IonRouterOutlet, IonTabs } from '@ionic/react';
import { cloudOutline, searchOutline } from 'ionicons/icons';
import { Route, Redirect } from 'react-router';
import Tab1 from './AppPages/Tab1';
import Tab2 from './AppPages/Tab2';
// import Tab1 from './AppPages/Tab1';
// import Tab2 from './AppPages/Tab2';
import './style.scss';
import Home from './pages/Home';
function DemoReactHookFormExample() {
return (
<IonTabs>
<IonTabs className="demo-react-hook-form-example">
<IonRouterOutlet>
<Route exact path="/demo-react-hook-form-example/tab1">
<Tab1 />
</Route>
<Route exact path="/demo-react-hook-form-example/tab2">
<Tab2 />
<Route exact path="/demo-react-hook-form-example/home">
<Home />
</Route>
<Redirect exact path="/demo-react-hook-form-example" to="/demo-react-hook-form-example/tab1" />
<Redirect
exact
path="/demo-react-hook-form-example"
to="/demo-react-hook-form-example/home"
/>
</IonRouterOutlet>
{/* */}
{/*
<IonTabBar slot="bottom">
<IonTabButton tab="tab1" href="/demo-react-hook-form-example/tab1">
<IonTabButton tab="tab1" href="/demo-react-hook-form-example/home">
<IonIcon icon={cloudOutline} />
<IonLabel>Dashboard</IonLabel>
</IonTabButton>
@@ -33,6 +34,7 @@ function DemoReactHookFormExample() {
<IonLabel>Search</IonLabel>
</IonTabButton>
</IonTabBar>
*/}
</IonTabs>
);
}