Fix for dynamic routes with app router SSR

This commit is contained in:
Nathan Chapman
2024-03-07 11:36:12 -06:00
parent 83ede65b5e
commit 9d8c110044
18 changed files with 327 additions and 229 deletions
+7 -6
View File
@@ -1,7 +1,6 @@
import { TodoListItem } from '../../mock';
import Store from '../../store';
import * as selectors from '../../store/selectors';
import {
IonPage,
IonHeader,
@@ -13,11 +12,13 @@ import {
IonList,
} from '@ionic/react';
const ListEntry = ({ list }: {list: TodoListItem}) => (
<IonItem routerLink={`/tabs/lists/${list.id}`} className="list-entry">
<IonLabel>{list.name}</IonLabel>
</IonItem>
);
const ListEntry = ({ list }: { list: TodoListItem }) => {
return (
<IonItem routerLink={`/lists/${list.id}`} className="list-entry">
<IonLabel>{list.name}</IonLabel>
</IonItem>
);
};
const AllLists = () => {
const lists = Store.useState(selectors.selectLists);