Fix for dynamic routes with app router SSR
This commit is contained in:
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"arrowParens": "avoid",
|
"arrowParens": "avoid",
|
||||||
"printWidth": 100
|
"trailingComma": "all"
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,17 @@
|
|||||||
import dynamic from 'next/dynamic';
|
import dynamic from 'next/dynamic';
|
||||||
|
import { lists } from '../../mock';
|
||||||
|
|
||||||
const App = dynamic(() => import('../../components/AppShell'), {
|
const App = dynamic(() => import('../../components/AppShell'), {
|
||||||
ssr: false,
|
ssr: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
export function generateStaticParams() {
|
export async function generateStaticParams() {
|
||||||
return [{ all: ['tabs', 'feed'] }];
|
return [
|
||||||
|
{ all: ['feed'] },
|
||||||
|
{ all: ['lists'] },
|
||||||
|
...lists.map(list => ({ all: ['lists', list.id] })),
|
||||||
|
{ all: ['settings'] },
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
|
|||||||
+10
-2
@@ -40,8 +40,16 @@ export default function RootLayout({
|
|||||||
return (
|
return (
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<body>{children}</body>
|
<body>{children}</body>
|
||||||
<Script type="module" src="https://unpkg.com/ionicons@5.2.3/dist/ionicons/ionicons.esm.js" />
|
<Script
|
||||||
<Script noModule src="https://unpkg.com/ionicons@5.2.3/dist/ionicons/ionicons.js" />
|
type="module"
|
||||||
|
src="https://unpkg.com/ionicons@5.2.3/dist/ionicons/ionicons.esm.js"
|
||||||
|
strategy="lazyOnload"
|
||||||
|
/>
|
||||||
|
<Script
|
||||||
|
noModule
|
||||||
|
src="https://unpkg.com/ionicons@5.2.3/dist/ionicons/ionicons.js"
|
||||||
|
strategy="lazyOnload"
|
||||||
|
/>
|
||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-11
@@ -1,29 +1,29 @@
|
|||||||
'use client';
|
'use client';
|
||||||
import { IonApp, IonRouterOutlet, setupIonicReact } from '@ionic/react';
|
import { IonApp, IonRouterOutlet, setupIonicReact } from '@ionic/react';
|
||||||
import { StatusBar, Style } from '@capacitor/status-bar';
|
import { StatusBar, Style } from '@capacitor/status-bar';
|
||||||
|
|
||||||
import { IonReactRouter } from '@ionic/react-router';
|
import { IonReactRouter } from '@ionic/react-router';
|
||||||
import { Redirect, Route } from 'react-router-dom';
|
import { Route } from 'react-router-dom';
|
||||||
|
|
||||||
import Tabs from './pages/Tabs';
|
import Tabs from './pages/Tabs';
|
||||||
|
|
||||||
setupIonicReact({});
|
setupIonicReact({});
|
||||||
|
|
||||||
window.matchMedia('(prefers-color-scheme: dark)').addListener(async status => {
|
window
|
||||||
try {
|
.matchMedia('(prefers-color-scheme: dark)')
|
||||||
await StatusBar.setStyle({
|
.addEventListener('change', async status => {
|
||||||
style: status.matches ? Style.Dark : Style.Light,
|
try {
|
||||||
});
|
await StatusBar.setStyle({
|
||||||
} catch {}
|
style: status.matches ? Style.Dark : Style.Light,
|
||||||
});
|
});
|
||||||
|
} catch {}
|
||||||
|
});
|
||||||
|
|
||||||
const AppShell = () => {
|
const AppShell = () => {
|
||||||
return (
|
return (
|
||||||
<IonApp>
|
<IonApp>
|
||||||
<IonReactRouter>
|
<IonReactRouter>
|
||||||
<IonRouterOutlet id="main">
|
<IonRouterOutlet id="main">
|
||||||
<Route path="/tabs" render={() => <Tabs />} />
|
<Route path="/" render={() => <Tabs />} />
|
||||||
<Route path="/" render={() => <Redirect to="/tabs/feed" />} exact={true} />
|
|
||||||
</IonRouterOutlet>
|
</IonRouterOutlet>
|
||||||
</IonReactRouter>
|
</IonReactRouter>
|
||||||
</IonApp>
|
</IonApp>
|
||||||
|
|||||||
@@ -25,22 +25,47 @@ type FeedCardProps = {
|
|||||||
author: string;
|
author: string;
|
||||||
authorAvatar: string;
|
authorAvatar: string;
|
||||||
image: string;
|
image: string;
|
||||||
}
|
};
|
||||||
|
|
||||||
const FeedCard = ({ title, type, text, author, authorAvatar, image }: FeedCardProps) => (
|
const FeedCard = ({
|
||||||
|
title,
|
||||||
|
type,
|
||||||
|
text,
|
||||||
|
author,
|
||||||
|
authorAvatar,
|
||||||
|
image,
|
||||||
|
}: FeedCardProps) => (
|
||||||
<Card className="my-4 mx-auto">
|
<Card className="my-4 mx-auto">
|
||||||
<div className="h-32 w-full relative">
|
<div className="h-32 w-full relative">
|
||||||
<Image className="rounded-t-xl object-cover min-w-full min-h-full max-w-full max-h-full" src={image} alt="" fill />
|
<Image
|
||||||
|
className="rounded-t-xl object-cover min-w-full min-h-full max-w-full max-h-full"
|
||||||
|
src={image}
|
||||||
|
alt=""
|
||||||
|
fill
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="px-4 py-4 bg-white rounded-b-xl dark:bg-gray-900">
|
<div className="px-4 py-4 bg-white rounded-b-xl dark:bg-gray-900">
|
||||||
<h4 className="font-bold py-0 text-s text-gray-400 dark:text-gray-500 uppercase">{type}</h4>
|
<h4 className="font-bold py-0 text-s text-gray-400 dark:text-gray-500 uppercase">
|
||||||
<h2 className="font-bold text-2xl text-gray-800 dark:text-gray-100">{title}</h2>
|
{type}
|
||||||
<p className="sm:text-sm text-s text-gray-500 mr-1 my-3 dark:text-gray-400">{text}</p>
|
</h4>
|
||||||
|
<h2 className="font-bold text-2xl text-gray-800 dark:text-gray-100">
|
||||||
|
{title}
|
||||||
|
</h2>
|
||||||
|
<p className="sm:text-sm text-s text-gray-500 mr-1 my-3 dark:text-gray-400">
|
||||||
|
{text}
|
||||||
|
</p>
|
||||||
<div className="flex items-center space-x-4">
|
<div className="flex items-center space-x-4">
|
||||||
<div className="w-10 h-10 relative">
|
<div className="w-10 h-10 relative">
|
||||||
<Image src={authorAvatar} className="rounded-full object-cover min-w-full min-h-full max-w-full max-h-full" alt="" fill />
|
<Image
|
||||||
|
src={authorAvatar}
|
||||||
|
className="rounded-full object-cover min-w-full min-h-full max-w-full max-h-full"
|
||||||
|
alt=""
|
||||||
|
fill
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<h3 className="text-gray-500 dark:text-gray-200 m-l-8 text-sm font-medium">{author}</h3>
|
<h3 className="text-gray-500 dark:text-gray-200 m-l-8 text-sm font-medium">
|
||||||
|
{author}
|
||||||
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
@@ -71,7 +96,10 @@ const Feed = () => {
|
|||||||
<IonTitle size="large">Feed</IonTitle>
|
<IonTitle size="large">Feed</IonTitle>
|
||||||
</IonToolbar>
|
</IonToolbar>
|
||||||
</IonHeader>
|
</IonHeader>
|
||||||
<Notifications open={showNotifications} onDidDismiss={() => setShowNotifications(false)} />
|
<Notifications
|
||||||
|
open={showNotifications}
|
||||||
|
onDidDismiss={() => setShowNotifications(false)}
|
||||||
|
/>
|
||||||
{homeItems.map((i, index) => (
|
{homeItems.map((i, index) => (
|
||||||
<FeedCard {...i} key={index} />
|
<FeedCard {...i} key={index} />
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ type ListDetailParams = {
|
|||||||
listId: string;
|
listId: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const ListItems = ({ list }: {list: TodoListItem}) => {
|
const ListItems = ({ list }: { list: TodoListItem }) => {
|
||||||
return (
|
return (
|
||||||
<IonList>
|
<IonList>
|
||||||
{(list?.items || []).map((item, key) => (
|
{(list?.items || []).map((item, key) => (
|
||||||
@@ -32,10 +32,20 @@ const ListItems = ({ list }: {list: TodoListItem}) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const ListItemEntry = ({ list, item }: {list: TodoListItem, item: ListItem}) => (
|
const ListItemEntry = ({
|
||||||
|
list,
|
||||||
|
item,
|
||||||
|
}: {
|
||||||
|
list: TodoListItem;
|
||||||
|
item: ListItem;
|
||||||
|
}) => (
|
||||||
<IonItem onClick={() => actions.setDone(list, item, !item.done)}>
|
<IonItem onClick={() => actions.setDone(list, item, !item.done)}>
|
||||||
<IonLabel>{item.name}</IonLabel>
|
<IonLabel>{item.name}</IonLabel>
|
||||||
<IonCheckbox checked={item.done || false} slot="end" />
|
<IonCheckbox
|
||||||
|
aria-label={item.name}
|
||||||
|
checked={item.done || false}
|
||||||
|
slot="end"
|
||||||
|
/>
|
||||||
</IonItem>
|
</IonItem>
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -50,14 +60,12 @@ const ListDetail = () => {
|
|||||||
<IonHeader>
|
<IonHeader>
|
||||||
<IonToolbar>
|
<IonToolbar>
|
||||||
<IonButtons slot="start">
|
<IonButtons slot="start">
|
||||||
<IonBackButton defaultHref="/tabs/lists" />
|
<IonBackButton defaultHref="/lists" />
|
||||||
</IonButtons>
|
</IonButtons>
|
||||||
<IonTitle>{loadedList?.name}</IonTitle>
|
<IonTitle>{loadedList?.name}</IonTitle>
|
||||||
</IonToolbar>
|
</IonToolbar>
|
||||||
</IonHeader>
|
</IonHeader>
|
||||||
<IonContent>
|
<IonContent>{loadedList && <ListItems list={loadedList} />}</IonContent>
|
||||||
{loadedList && <ListItems list={loadedList} />}
|
|
||||||
</IonContent>
|
|
||||||
</IonPage>
|
</IonPage>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { TodoListItem } from '../../mock';
|
import { TodoListItem } from '../../mock';
|
||||||
import Store from '../../store';
|
import Store from '../../store';
|
||||||
import * as selectors from '../../store/selectors';
|
import * as selectors from '../../store/selectors';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
IonPage,
|
IonPage,
|
||||||
IonHeader,
|
IonHeader,
|
||||||
@@ -13,11 +12,13 @@ import {
|
|||||||
IonList,
|
IonList,
|
||||||
} from '@ionic/react';
|
} from '@ionic/react';
|
||||||
|
|
||||||
const ListEntry = ({ list }: {list: TodoListItem}) => (
|
const ListEntry = ({ list }: { list: TodoListItem }) => {
|
||||||
<IonItem routerLink={`/tabs/lists/${list.id}`} className="list-entry">
|
return (
|
||||||
<IonLabel>{list.name}</IonLabel>
|
<IonItem routerLink={`/lists/${list.id}`} className="list-entry">
|
||||||
</IonItem>
|
<IonLabel>{list.name}</IonLabel>
|
||||||
);
|
</IonItem>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const AllLists = () => {
|
const AllLists = () => {
|
||||||
const lists = Store.useState(selectors.selectLists);
|
const lists = Store.useState(selectors.selectLists);
|
||||||
|
|||||||
@@ -17,7 +17,11 @@ import { selectNotifications } from '../../store/selectors';
|
|||||||
import { close } from 'ionicons/icons';
|
import { close } from 'ionicons/icons';
|
||||||
import { NotificationItem } from '../../mock';
|
import { NotificationItem } from '../../mock';
|
||||||
|
|
||||||
const NotificationItem = ({ notification }: {notification: NotificationItem}) => (
|
const NotificationItem = ({
|
||||||
|
notification,
|
||||||
|
}: {
|
||||||
|
notification: NotificationItem;
|
||||||
|
}) => (
|
||||||
<IonItem>
|
<IonItem>
|
||||||
<IonLabel>{notification.title}</IonLabel>
|
<IonLabel>{notification.title}</IonLabel>
|
||||||
<IonNote slot="end">{notification.when}</IonNote>
|
<IonNote slot="end">{notification.when}</IonNote>
|
||||||
@@ -27,7 +31,13 @@ const NotificationItem = ({ notification }: {notification: NotificationItem}) =>
|
|||||||
</IonItem>
|
</IonItem>
|
||||||
);
|
);
|
||||||
|
|
||||||
const Notifications = ({ open, onDidDismiss }: {open: boolean, onDidDismiss: () => void}) => {
|
const Notifications = ({
|
||||||
|
open,
|
||||||
|
onDidDismiss,
|
||||||
|
}: {
|
||||||
|
open: boolean;
|
||||||
|
onDidDismiss: () => void;
|
||||||
|
}) => {
|
||||||
const notifications = Store.useState(selectNotifications);
|
const notifications = Store.useState(selectNotifications);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -35,7 +45,12 @@ const Notifications = ({ open, onDidDismiss }: {open: boolean, onDidDismiss: ()
|
|||||||
<IonHeader>
|
<IonHeader>
|
||||||
<IonToolbar>
|
<IonToolbar>
|
||||||
<IonTitle>Notifications</IonTitle>
|
<IonTitle>Notifications</IonTitle>
|
||||||
<IonButton slot="end" fill="clear" color="dark" onClick={onDidDismiss}>
|
<IonButton
|
||||||
|
slot="end"
|
||||||
|
fill="clear"
|
||||||
|
color="dark"
|
||||||
|
onClick={onDidDismiss}
|
||||||
|
>
|
||||||
<IonIcon icon={close} />
|
<IonIcon icon={close} />
|
||||||
</IonButton>
|
</IonButton>
|
||||||
</IonToolbar>
|
</IonToolbar>
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import {
|
|||||||
IonContent,
|
IonContent,
|
||||||
IonList,
|
IonList,
|
||||||
IonToggle,
|
IonToggle,
|
||||||
IonLabel,
|
|
||||||
} from '@ionic/react';
|
} from '@ionic/react';
|
||||||
|
|
||||||
import Store from '../../store';
|
import Store from '../../store';
|
||||||
@@ -16,7 +15,6 @@ import { setSettings } from '../../store/actions';
|
|||||||
|
|
||||||
const Settings = () => {
|
const Settings = () => {
|
||||||
const settings = Store.useState(selectors.selectSettings);
|
const settings = Store.useState(selectors.selectSettings);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IonPage>
|
<IonPage>
|
||||||
<IonHeader>
|
<IonHeader>
|
||||||
@@ -27,7 +25,6 @@ const Settings = () => {
|
|||||||
<IonContent>
|
<IonContent>
|
||||||
<IonList>
|
<IonList>
|
||||||
<IonItem>
|
<IonItem>
|
||||||
<IonLabel>Enable Notifications</IonLabel>
|
|
||||||
<IonToggle
|
<IonToggle
|
||||||
checked={settings.enableNotifications}
|
checked={settings.enableNotifications}
|
||||||
onIonChange={e => {
|
onIonChange={e => {
|
||||||
@@ -36,7 +33,9 @@ const Settings = () => {
|
|||||||
enableNotifications: e.target.checked,
|
enableNotifications: e.target.checked,
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
>
|
||||||
|
Enable Notifications
|
||||||
|
</IonToggle>
|
||||||
</IonItem>
|
</IonItem>
|
||||||
</IonList>
|
</IonList>
|
||||||
</IonContent>
|
</IonContent>
|
||||||
|
|||||||
+20
-10
@@ -1,6 +1,12 @@
|
|||||||
import { Redirect, Route } from 'react-router-dom';
|
import { Redirect, Route } from 'react-router-dom';
|
||||||
import { IonRouterOutlet, IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel } from '@ionic/react';
|
import {
|
||||||
import { IonReactRouter } from '@ionic/react-router';
|
IonRouterOutlet,
|
||||||
|
IonTabs,
|
||||||
|
IonTabBar,
|
||||||
|
IonTabButton,
|
||||||
|
IonIcon,
|
||||||
|
IonLabel,
|
||||||
|
} from '@ionic/react';
|
||||||
import { cog, flash, list } from 'ionicons/icons';
|
import { cog, flash, list } from 'ionicons/icons';
|
||||||
|
|
||||||
import Home from './Feed';
|
import Home from './Feed';
|
||||||
@@ -12,22 +18,26 @@ const Tabs = () => {
|
|||||||
return (
|
return (
|
||||||
<IonTabs>
|
<IonTabs>
|
||||||
<IonRouterOutlet>
|
<IonRouterOutlet>
|
||||||
<Route path="/tabs/feed" render={() => <Home />} exact={true} />
|
<Route path="/feed" render={() => <Home />} exact={true} />
|
||||||
<Route path="/tabs/lists" render={() => <Lists />} exact={true} />
|
<Route path="/lists" render={() => <Lists />} exact={true} />
|
||||||
<Route path="/tabs/lists/:listId" render={() => <ListDetail />} exact={true} />
|
<Route
|
||||||
<Route path="/tabs/settings" render={() => <Settings />} exact={true} />
|
path="/lists/:listId"
|
||||||
<Route path="/tabs" render={() => <Redirect to="/tabs/feed" />} exact={true} />
|
render={() => <ListDetail />}
|
||||||
|
exact={true}
|
||||||
|
/>
|
||||||
|
<Route path="/settings" render={() => <Settings />} exact={true} />
|
||||||
|
<Route path="" render={() => <Redirect to="/feed" />} exact={true} />
|
||||||
</IonRouterOutlet>
|
</IonRouterOutlet>
|
||||||
<IonTabBar slot="bottom">
|
<IonTabBar slot="bottom">
|
||||||
<IonTabButton tab="tab1" href="/tabs/feed">
|
<IonTabButton tab="tab1" href="/feed">
|
||||||
<IonIcon icon={flash} />
|
<IonIcon icon={flash} />
|
||||||
<IonLabel>Feed</IonLabel>
|
<IonLabel>Feed</IonLabel>
|
||||||
</IonTabButton>
|
</IonTabButton>
|
||||||
<IonTabButton tab="tab2" href="/tabs/lists">
|
<IonTabButton tab="tab2" href="/lists">
|
||||||
<IonIcon icon={list} />
|
<IonIcon icon={list} />
|
||||||
<IonLabel>Lists</IonLabel>
|
<IonLabel>Lists</IonLabel>
|
||||||
</IonTabButton>
|
</IonTabButton>
|
||||||
<IonTabButton tab="tab3" href="/tabs/settings">
|
<IonTabButton tab="tab3" href="/settings">
|
||||||
<IonIcon icon={cog} />
|
<IonIcon icon={cog} />
|
||||||
<IonLabel>Settings</IonLabel>
|
<IonLabel>Settings</IonLabel>
|
||||||
</IonTabButton>
|
</IonTabButton>
|
||||||
|
|||||||
+10
-2
@@ -1,8 +1,16 @@
|
|||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
|
||||||
const Card = ({ children, className }: {children: React.ReactElement[], className: string}) => (
|
const Card = ({
|
||||||
|
children,
|
||||||
|
className,
|
||||||
|
}: {
|
||||||
|
children: React.ReactElement[];
|
||||||
|
className: string;
|
||||||
|
}) => (
|
||||||
<div className={classNames('max-w-xl', className)}>
|
<div className={classNames('max-w-xl', className)}>
|
||||||
<div className="bg-white shadow-md rounded-b-xl dark:bg-black">{children}</div>
|
<div className="bg-white shadow-md rounded-b-xl dark:bg-black">
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
+31
-26
@@ -1,9 +1,3 @@
|
|||||||
export const images = [
|
|
||||||
'/img/c1.avif',
|
|
||||||
'/img/c2.avif',
|
|
||||||
'/img/c3.avif',
|
|
||||||
];
|
|
||||||
|
|
||||||
export type HomeItem = {
|
export type HomeItem = {
|
||||||
id: number;
|
id: number;
|
||||||
title: string;
|
title: string;
|
||||||
@@ -22,27 +16,25 @@ export const homeItems: HomeItem[] = [
|
|||||||
text: 'We just got back from a trip to Maui, and we had a great time...',
|
text: 'We just got back from a trip to Maui, and we had a great time...',
|
||||||
author: 'Max Lynch',
|
author: 'Max Lynch',
|
||||||
authorAvatar: '/img/max.jpg',
|
authorAvatar: '/img/max.jpg',
|
||||||
image: images[0],
|
image: '/img/c1.avif',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
title: 'Arctic Adventures',
|
title: 'Arctic Adventures',
|
||||||
type: 'Blog',
|
type: 'Blog',
|
||||||
text:
|
text: 'Last month we took a trek to the Arctic Circle. The isolation was just what we needed after...',
|
||||||
'Last month we took a trek to the Arctic Circle. The isolation was just what we needed after...',
|
author: 'Nathan Chapman',
|
||||||
author: 'Max Lynch',
|
authorAvatar: '/img/nathan.jpg',
|
||||||
authorAvatar: '/img/max.jpg',
|
image: '/img/c2.avif',
|
||||||
image: images[1],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
title: 'Frolicking in the Faroe Islands',
|
title: 'Frolicking in the Faroe Islands',
|
||||||
type: 'Blog',
|
type: 'Blog',
|
||||||
text:
|
text: 'The Faroe Islands are a North Atlantic archipelago located 320 kilometres (200 mi) north-northwest of Scotland...',
|
||||||
'The Faroe Islands are a North Atlantic archipelago located 320 kilometres (200 mi) north-northwest of Scotland...',
|
author: 'Leo Giovanetti',
|
||||||
author: 'Max Lynch',
|
authorAvatar: '/img/leo.jpg',
|
||||||
authorAvatar: '/img/max.jpg',
|
image: '/img/c3.avif',
|
||||||
image: images[2],
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -62,24 +54,29 @@ export const notifications: NotificationItem[] = [
|
|||||||
export type ListItem = {
|
export type ListItem = {
|
||||||
name: string;
|
name: string;
|
||||||
done?: boolean;
|
done?: boolean;
|
||||||
}
|
};
|
||||||
|
|
||||||
export type TodoListItem = {
|
export type TodoListItem = {
|
||||||
name: string;
|
name: string;
|
||||||
id: string;
|
id: string;
|
||||||
items?: ListItem[];
|
items?: ListItem[];
|
||||||
}
|
};
|
||||||
|
|
||||||
// Some fake lists
|
// Some fake lists
|
||||||
export const lists: TodoListItem[] = [
|
export const lists: TodoListItem[] = [
|
||||||
{
|
{
|
||||||
name: 'Groceries',
|
name: 'Groceries',
|
||||||
id: 'groceries',
|
id: '01HRCYTYED31N83MJ0WK97WC02',
|
||||||
items: [{ name: 'Apples' }, { name: 'Bananas' }, { name: 'Milk' }, { name: 'Ice Cream' }],
|
items: [
|
||||||
|
{ name: 'Apples' },
|
||||||
|
{ name: 'Bananas' },
|
||||||
|
{ name: 'Milk' },
|
||||||
|
{ name: 'Ice Cream' },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Hardware Store',
|
name: 'Hardware Store',
|
||||||
id: 'hardware',
|
id: '01HRCYV2KPNJQJ43Y7X526BHVX',
|
||||||
items: [
|
items: [
|
||||||
{ name: 'Circular Saw' },
|
{ name: 'Circular Saw' },
|
||||||
{ name: 'Tack Cloth' },
|
{ name: 'Tack Cloth' },
|
||||||
@@ -87,14 +84,22 @@ export const lists: TodoListItem[] = [
|
|||||||
{ name: 'Router' },
|
{ name: 'Router' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{ name: 'Work', id: 'work', items: [{ name: 'TPS Report' }, { name: 'Set up email' }] },
|
{
|
||||||
{ name: 'Reminders', id: 'reminders' },
|
name: 'Work',
|
||||||
|
id: '01HRCYV6C3YWAJRF2ZE7AZ17K7',
|
||||||
|
items: [{ name: 'TPS Report' }, { name: 'Set up email' }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Reminders',
|
||||||
|
id: '01HRCYVADRPCM5SYV5BH98C7HS',
|
||||||
|
items: [{ name: 'Get car inspection', done: true }],
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export type Settings = {
|
export type Settings = {
|
||||||
enableNotifications: boolean;
|
enableNotifications: boolean;
|
||||||
}
|
};
|
||||||
|
|
||||||
export const settings: Settings = {
|
export const settings: Settings = {
|
||||||
enableNotifications: true,
|
enableNotifications: true,
|
||||||
}
|
};
|
||||||
|
|||||||
+7
-2
@@ -13,5 +13,10 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
output: 'export',
|
output: 'export',
|
||||||
swcMinify: true,
|
swcMinify: true,
|
||||||
transpilePackages: ['@ionic/react', '@ionic/core', '@stencil/core', 'ionicons'],
|
transpilePackages: [
|
||||||
}
|
'@ionic/react',
|
||||||
|
'@ionic/core',
|
||||||
|
'@stencil/core',
|
||||||
|
'ionicons',
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|||||||
Generated
+122
-122
@@ -8,38 +8,38 @@
|
|||||||
"name": "nextjs-tailwind-ionic-capacitor-starter",
|
"name": "nextjs-tailwind-ionic-capacitor-starter",
|
||||||
"version": "5.0.0",
|
"version": "5.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@capacitor/android": "5.7.0",
|
"@capacitor/android": "5.7.2",
|
||||||
"@capacitor/core": "5.7.0",
|
"@capacitor/core": "5.7.2",
|
||||||
"@capacitor/ios": "5.7.0",
|
"@capacitor/ios": "5.7.2",
|
||||||
"@capacitor/status-bar": "5.0.7",
|
"@capacitor/status-bar": "5.0.7",
|
||||||
"@ionic/react": "7.7.3",
|
"@ionic/react": "7.7.4",
|
||||||
"@ionic/react-router": "7.7.3",
|
"@ionic/react-router": "7.7.4",
|
||||||
"classnames": "2.5.1",
|
"classnames": "2.5.1",
|
||||||
"next": "14.1.0",
|
"next": "14.1.3",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"react-router": "5.3.4",
|
"react-router": "5.3.4",
|
||||||
"react-router-dom": "5.3.4",
|
"react-router-dom": "5.3.4",
|
||||||
"react-virtuoso": "4.7.0"
|
"react-virtuoso": "4.7.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@capacitor/cli": "5.7.0",
|
"@capacitor/cli": "5.7.2",
|
||||||
"@types/jest": "29.5.12",
|
"@types/jest": "29.5.12",
|
||||||
"@types/node": "20.11.19",
|
"@types/node": "20.11.25",
|
||||||
"@types/react": "18.2.57",
|
"@types/react": "18.2.64",
|
||||||
"@types/react-dom": "18.2.19",
|
"@types/react-dom": "18.2.21",
|
||||||
"@types/react-router": "5.1.20",
|
"@types/react-router": "5.1.20",
|
||||||
"@types/react-router-dom": "5.3.3",
|
"@types/react-router-dom": "5.3.3",
|
||||||
"autoprefixer": "10.4.17",
|
"autoprefixer": "10.4.18",
|
||||||
"eslint": "8.56.0",
|
"eslint": "8.57.0",
|
||||||
"eslint-config-next": "14.1.0",
|
"eslint-config-next": "14.1.3",
|
||||||
"ionicons": "7.2.2",
|
"ionicons": "7.2.2",
|
||||||
"postcss": "8.4.35",
|
"postcss": "8.4.35",
|
||||||
"prettier": "3.2.5",
|
"prettier": "3.2.5",
|
||||||
"pullstate": "1.25",
|
"pullstate": "1.25",
|
||||||
"reselect": "5.1.0",
|
"reselect": "5.1.0",
|
||||||
"tailwindcss": "3.4.1",
|
"tailwindcss": "3.4.1",
|
||||||
"typescript": "5.3.3"
|
"typescript": "5.4.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.17"
|
"node": ">=18.17"
|
||||||
@@ -256,17 +256,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@capacitor/android": {
|
"node_modules/@capacitor/android": {
|
||||||
"version": "5.7.0",
|
"version": "5.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@capacitor/android/-/android-5.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/@capacitor/android/-/android-5.7.2.tgz",
|
||||||
"integrity": "sha512-0bnG1dqfT/nTjzMeHF/a5kF8mqGjHrPLADNqn41seWDfb2ch6AMiKUHsmHpEOWmGIrWOM25qNTrTOytoCSpuXg==",
|
"integrity": "sha512-T4U+15R/1PyokW0Le92j7AV19kuO25his2ymF2xf2I04fZUDj8RjmXA+za7i3K8vhxtKkTdY2dPAywrfNAM09Q==",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@capacitor/core": "^5.7.0"
|
"@capacitor/core": "^5.7.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@capacitor/cli": {
|
"node_modules/@capacitor/cli": {
|
||||||
"version": "5.7.0",
|
"version": "5.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@capacitor/cli/-/cli-5.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/@capacitor/cli/-/cli-5.7.2.tgz",
|
||||||
"integrity": "sha512-md6217RXFQwSNo9vr1gDgBqR88MJaQVwu3C5W3bpWlmajhec6NUR7yT7QNcBWErhCIJfqOOqXu4ZSSShndF0ug==",
|
"integrity": "sha512-dTW48klx39Mm2twkRU5pHw7tFRGtGk80fw5psopmbx8Ep5FG08HprqnwK5DXsFPhgJaC+ax4VDwmFCvb8uAGFA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ionic/cli-framework-output": "^2.2.5",
|
"@ionic/cli-framework-output": "^2.2.5",
|
||||||
@@ -296,17 +296,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@capacitor/core": {
|
"node_modules/@capacitor/core": {
|
||||||
"version": "5.7.0",
|
"version": "5.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@capacitor/core/-/core-5.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/@capacitor/core/-/core-5.7.2.tgz",
|
||||||
"integrity": "sha512-wa9Fao+Axa1t2ZERMyQD9r0xyfglQyC4DHQKintzKaIqcRuVe9J31TmfD3IxROYi9LGpY4X8cq4m4bjb0W94Qg==",
|
"integrity": "sha512-/OUtfINmk7ke32VtKIHRAy8NlunbeK+aCqCHOS+fvtr7nUsOJXPkYgbgqZp/CWXET/gSK1xxMecaVBzpE98UKA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.1.0"
|
"tslib": "^2.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@capacitor/ios": {
|
"node_modules/@capacitor/ios": {
|
||||||
"version": "5.7.0",
|
"version": "5.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/@capacitor/ios/-/ios-5.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/@capacitor/ios/-/ios-5.7.2.tgz",
|
||||||
"integrity": "sha512-zoEdsYQHI1zz2vjKsTpu5bSfxQQ5jrk3Qs6Op9MYcckZZ2QWIs0YpL99p+zODXNpkkyLG73NXEIrOjvyI9jx8A==",
|
"integrity": "sha512-msh+Kqjv/MyVCrSH0zVtwxptXnsgky4FENUq+Xdaa1pqEglmpHlUKod1Jf7qhfAhTLhHPyokOZMvaIyTtoSwCA==",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@capacitor/core": "^5.7.0"
|
"@capacitor/core": "^5.7.0"
|
||||||
}
|
}
|
||||||
@@ -367,9 +367,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@eslint/js": {
|
"node_modules/@eslint/js": {
|
||||||
"version": "8.56.0",
|
"version": "8.57.0",
|
||||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz",
|
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz",
|
||||||
"integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==",
|
"integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
@@ -423,9 +423,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ionic/core": {
|
"node_modules/@ionic/core": {
|
||||||
"version": "7.7.3",
|
"version": "7.7.4",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-7.7.3.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-7.7.4.tgz",
|
||||||
"integrity": "sha512-DSv6DPuiLU2MXsgDAXKFJW5OXxT7EyPy2jcQf03RcWooWeFryy979mqotPw7BgUuWt/fVGuz2tl3peAJGSqmDQ==",
|
"integrity": "sha512-zThio3ZfbTu+3eM6QBdyeEk5OBc7M0ApFwSlP/G7rrFVcTPm12FNvG9VPD+aN5NwnYy0EsV3hlMkxbawoqjVLw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@stencil/core": "^4.12.2",
|
"@stencil/core": "^4.12.2",
|
||||||
"ionicons": "^7.2.2",
|
"ionicons": "^7.2.2",
|
||||||
@@ -433,11 +433,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ionic/react": {
|
"node_modules/@ionic/react": {
|
||||||
"version": "7.7.3",
|
"version": "7.7.4",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/react/-/react-7.7.3.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/react/-/react-7.7.4.tgz",
|
||||||
"integrity": "sha512-b8jLpqv4dZ9nB9zoxhe0KR1Wk9bWMQ3UXQcOPu20+zYrxExwPqpLJ93LI0bU4F7ellduMjsakvELY486FeRrXw==",
|
"integrity": "sha512-UBNBUjBN1fmCUyH8hetu0/q3F4pSNFVpjhh3Bt3s/bUXy0ksCuGbiYg/hET9QW1ja17ijq0+coqREXEB8lTmrA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ionic/core": "7.7.3",
|
"@ionic/core": "7.7.4",
|
||||||
"ionicons": "^7.0.0",
|
"ionicons": "^7.0.0",
|
||||||
"tslib": "*"
|
"tslib": "*"
|
||||||
},
|
},
|
||||||
@@ -447,11 +447,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ionic/react-router": {
|
"node_modules/@ionic/react-router": {
|
||||||
"version": "7.7.3",
|
"version": "7.7.4",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/react-router/-/react-router-7.7.3.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/react-router/-/react-router-7.7.4.tgz",
|
||||||
"integrity": "sha512-NmEk801pfbrqzyTAb5nLDWGseUzm7kMpUy0dMY6OU76tpuHrEFBCFkZYAlTJWqXhkGRj9cR0cMnFAhPtGeSCkg==",
|
"integrity": "sha512-phPpcRGoeQA3YTxRx1069yrtgsqWXhsDfcR7BJlgj0/uk4Wmx2NsUKV/nQrFmrtXdZSspFIrbd3yorq3gRhClA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ionic/react": "7.7.3",
|
"@ionic/react": "7.7.4",
|
||||||
"tslib": "*"
|
"tslib": "*"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
@@ -791,23 +791,23 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@next/env": {
|
"node_modules/@next/env": {
|
||||||
"version": "14.1.0",
|
"version": "14.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-14.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@next/env/-/env-14.1.3.tgz",
|
||||||
"integrity": "sha512-Py8zIo+02ht82brwwhTg36iogzFqGLPXlRGKQw5s+qP/kMNc4MAyDeEwBKDijk6zTIbegEgu8Qy7C1LboslQAw=="
|
"integrity": "sha512-VhgXTvrgeBRxNPjyfBsDIMvgsKDxjlpw4IAUsHCX8Gjl1vtHUYRT3+xfQ/wwvLPDd/6kqfLqk9Pt4+7gysuCKQ=="
|
||||||
},
|
},
|
||||||
"node_modules/@next/eslint-plugin-next": {
|
"node_modules/@next/eslint-plugin-next": {
|
||||||
"version": "14.1.0",
|
"version": "14.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.1.3.tgz",
|
||||||
"integrity": "sha512-x4FavbNEeXx/baD/zC/SdrvkjSby8nBn8KcCREqk6UuwvwoAPZmaV8TFCAuo/cpovBRTIY67mHhe86MQQm/68Q==",
|
"integrity": "sha512-VCnZI2cy77Yaj3L7Uhs3+44ikMM1VD/fBMwvTBb3hIaTIuqa+DmG4dhUDq+MASu3yx97KhgsVJbsas0XuiKyww==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"glob": "10.3.10"
|
"glob": "10.3.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@next/swc-darwin-arm64": {
|
"node_modules/@next/swc-darwin-arm64": {
|
||||||
"version": "14.1.0",
|
"version": "14.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.1.3.tgz",
|
||||||
"integrity": "sha512-nUDn7TOGcIeyQni6lZHfzNoo9S0euXnu0jhsbMOmMJUBfgsnESdjN97kM7cBqQxZa8L/bM9om/S5/1dzCrW6wQ==",
|
"integrity": "sha512-LALu0yIBPRiG9ANrD5ncB3pjpO0Gli9ZLhxdOu6ZUNf3x1r3ea1rd9Q+4xxUkGrUXLqKVK9/lDkpYIJaCJ6AHQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -820,9 +820,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@next/swc-darwin-x64": {
|
"node_modules/@next/swc-darwin-x64": {
|
||||||
"version": "14.1.0",
|
"version": "14.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.1.3.tgz",
|
||||||
"integrity": "sha512-1jgudN5haWxiAl3O1ljUS2GfupPmcftu2RYJqZiMJmmbBT5M1XDffjUtRUzP4W3cBHsrvkfOFdQ71hAreNQP6g==",
|
"integrity": "sha512-E/9WQeXxkqw2dfcn5UcjApFgUq73jqNKaE5bysDm58hEUdUGedVrnRhblhJM7HbCZNhtVl0j+6TXsK0PuzXTCg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -835,9 +835,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@next/swc-linux-arm64-gnu": {
|
"node_modules/@next/swc-linux-arm64-gnu": {
|
||||||
"version": "14.1.0",
|
"version": "14.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.1.3.tgz",
|
||||||
"integrity": "sha512-RHo7Tcj+jllXUbK7xk2NyIDod3YcCPDZxj1WLIYxd709BQ7WuRYl3OWUNG+WUfqeQBds6kvZYlc42NJJTNi4tQ==",
|
"integrity": "sha512-USArX9B+3rZSXYLFvgy0NVWQgqh6LHWDmMt38O4lmiJNQcwazeI6xRvSsliDLKt+78KChVacNiwvOMbl6g6BBw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -850,9 +850,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@next/swc-linux-arm64-musl": {
|
"node_modules/@next/swc-linux-arm64-musl": {
|
||||||
"version": "14.1.0",
|
"version": "14.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.1.3.tgz",
|
||||||
"integrity": "sha512-v6kP8sHYxjO8RwHmWMJSq7VZP2nYCkRVQ0qolh2l6xroe9QjbgV8siTbduED4u0hlk0+tjS6/Tuy4n5XCp+l6g==",
|
"integrity": "sha512-esk1RkRBLSIEp1qaQXv1+s6ZdYzuVCnDAZySpa62iFTMGTisCyNQmqyCTL9P+cLJ4N9FKCI3ojtSfsyPHJDQNw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -865,9 +865,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@next/swc-linux-x64-gnu": {
|
"node_modules/@next/swc-linux-x64-gnu": {
|
||||||
"version": "14.1.0",
|
"version": "14.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.1.3.tgz",
|
||||||
"integrity": "sha512-zJ2pnoFYB1F4vmEVlb/eSe+VH679zT1VdXlZKX+pE66grOgjmKJHKacf82g/sWE4MQ4Rk2FMBCRnX+l6/TVYzQ==",
|
"integrity": "sha512-8uOgRlYEYiKo0L8YGeS+3TudHVDWDjPVDUcST+z+dUzgBbTEwSSIaSgF/vkcC1T/iwl4QX9iuUyUdQEl0Kxalg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -880,9 +880,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@next/swc-linux-x64-musl": {
|
"node_modules/@next/swc-linux-x64-musl": {
|
||||||
"version": "14.1.0",
|
"version": "14.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.1.3.tgz",
|
||||||
"integrity": "sha512-rbaIYFt2X9YZBSbH/CwGAjbBG2/MrACCVu2X0+kSykHzHnYH5FjHxwXLkcoJ10cX0aWCEynpu+rP76x0914atg==",
|
"integrity": "sha512-DX2zqz05ziElLoxskgHasaJBREC5Y9TJcbR2LYqu4r7naff25B4iXkfXWfcp69uD75/0URmmoSgT8JclJtrBoQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -895,9 +895,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@next/swc-win32-arm64-msvc": {
|
"node_modules/@next/swc-win32-arm64-msvc": {
|
||||||
"version": "14.1.0",
|
"version": "14.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.1.3.tgz",
|
||||||
"integrity": "sha512-o1N5TsYc8f/HpGt39OUQpQ9AKIGApd3QLueu7hXk//2xq5Z9OxmV6sQfNp8C7qYmiOlHYODOGqNNa0e9jvchGQ==",
|
"integrity": "sha512-HjssFsCdsD4GHstXSQxsi2l70F/5FsRTRQp8xNgmQs15SxUfUJRvSI9qKny/jLkY3gLgiCR3+6A7wzzK0DBlfA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -910,9 +910,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@next/swc-win32-ia32-msvc": {
|
"node_modules/@next/swc-win32-ia32-msvc": {
|
||||||
"version": "14.1.0",
|
"version": "14.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.1.3.tgz",
|
||||||
"integrity": "sha512-XXIuB1DBRCFwNO6EEzCTMHT5pauwaSj4SWs7CYnME57eaReAKBXCnkUE80p/pAZcewm7hs+vGvNqDPacEXHVkw==",
|
"integrity": "sha512-DRuxD5axfDM1/Ue4VahwSxl1O5rn61hX8/sF0HY8y0iCbpqdxw3rB3QasdHn/LJ6Wb2y5DoWzXcz3L1Cr+Thrw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ia32"
|
"ia32"
|
||||||
],
|
],
|
||||||
@@ -925,9 +925,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@next/swc-win32-x64-msvc": {
|
"node_modules/@next/swc-win32-x64-msvc": {
|
||||||
"version": "14.1.0",
|
"version": "14.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.1.3.tgz",
|
||||||
"integrity": "sha512-9WEbVRRAqJ3YFVqEZIxUqkiO8l1nool1LmNxygr5HWF8AcSYsEpneUDhmjUVJEzO2A04+oPtZdombzzPPkTtgg==",
|
"integrity": "sha512-uC2DaDoWH7h1P/aJ4Fok3Xiw6P0Lo4ez7NbowW2VGNXw/Xv6tOuLUcxhBYZxsSUJtpeknCi8/fvnSpyCFp4Rcg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -1072,9 +1072,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "20.11.19",
|
"version": "20.11.25",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz",
|
||||||
"integrity": "sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==",
|
"integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~5.26.4"
|
"undici-types": "~5.26.4"
|
||||||
@@ -1087,9 +1087,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/react": {
|
"node_modules/@types/react": {
|
||||||
"version": "18.2.57",
|
"version": "18.2.64",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.57.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.64.tgz",
|
||||||
"integrity": "sha512-ZvQsktJgSYrQiMirAN60y4O/LRevIV8hUzSOSNB6gfR3/o3wCBFQx3sPwIYtuDMeiVgsSS3UzCV26tEzgnfvQw==",
|
"integrity": "sha512-MlmPvHgjj2p3vZaxbQgFUQFvD8QiZwACfGqEdDSWou5yISWxDQ4/74nCAwsUiX7UFLKZz3BbVSPj+YxeoGGCfg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/prop-types": "*",
|
"@types/prop-types": "*",
|
||||||
@@ -1098,9 +1098,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/react-dom": {
|
"node_modules/@types/react-dom": {
|
||||||
"version": "18.2.19",
|
"version": "18.2.21",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.19.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.21.tgz",
|
||||||
"integrity": "sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA==",
|
"integrity": "sha512-gnvBA/21SA4xxqNXEwNiVcP0xSGHh/gi1VhWv9Bl46a0ItbTT5nFY+G9VSQpaG/8N/qdJpJ+vftQ4zflTtnjLw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/react": "*"
|
"@types/react": "*"
|
||||||
@@ -1590,9 +1590,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/autoprefixer": {
|
"node_modules/autoprefixer": {
|
||||||
"version": "10.4.17",
|
"version": "10.4.18",
|
||||||
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.17.tgz",
|
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.18.tgz",
|
||||||
"integrity": "sha512-/cpVNRLSfhOtcGflT13P2794gVSgmPgTR+erw5ifnMLZb0UnSlkK4tquLmkd3BhA+nLo5tX8Cu0upUsGKvKbmg==",
|
"integrity": "sha512-1DKbDfsr6KUElM6wg+0zRNkB/Q7WcKYAaK+pzXn+Xqmszm/5Xa9coeNdtP88Vi+dPzZnMjhge8GIV49ZQkDa+g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -1609,8 +1609,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"browserslist": "^4.22.2",
|
"browserslist": "^4.23.0",
|
||||||
"caniuse-lite": "^1.0.30001578",
|
"caniuse-lite": "^1.0.30001591",
|
||||||
"fraction.js": "^4.3.7",
|
"fraction.js": "^4.3.7",
|
||||||
"normalize-range": "^0.1.2",
|
"normalize-range": "^0.1.2",
|
||||||
"picocolors": "^1.0.0",
|
"picocolors": "^1.0.0",
|
||||||
@@ -1827,9 +1827,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/caniuse-lite": {
|
"node_modules/caniuse-lite": {
|
||||||
"version": "1.0.30001588",
|
"version": "1.0.30001594",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001588.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001594.tgz",
|
||||||
"integrity": "sha512-+hVY9jE44uKLkH0SrUTqxjxqNTOWHsbnQDIKjwkZ3lNTzUUVdBLBGXtj/q5Mp5u98r3droaZAewQuEDzjQdZlQ==",
|
"integrity": "sha512-VblSX6nYqyJVs8DKFMldE2IVCJjZ225LW00ydtUWwh5hk9IfkTOffO6r8gJNsH0qqqeAF8KrbMYA2VEwTlGW5g==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@@ -2344,16 +2344,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint": {
|
"node_modules/eslint": {
|
||||||
"version": "8.56.0",
|
"version": "8.57.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz",
|
||||||
"integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==",
|
"integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.2.0",
|
"@eslint-community/eslint-utils": "^4.2.0",
|
||||||
"@eslint-community/regexpp": "^4.6.1",
|
"@eslint-community/regexpp": "^4.6.1",
|
||||||
"@eslint/eslintrc": "^2.1.4",
|
"@eslint/eslintrc": "^2.1.4",
|
||||||
"@eslint/js": "8.56.0",
|
"@eslint/js": "8.57.0",
|
||||||
"@humanwhocodes/config-array": "^0.11.13",
|
"@humanwhocodes/config-array": "^0.11.14",
|
||||||
"@humanwhocodes/module-importer": "^1.0.1",
|
"@humanwhocodes/module-importer": "^1.0.1",
|
||||||
"@nodelib/fs.walk": "^1.2.8",
|
"@nodelib/fs.walk": "^1.2.8",
|
||||||
"@ungap/structured-clone": "^1.2.0",
|
"@ungap/structured-clone": "^1.2.0",
|
||||||
@@ -2399,12 +2399,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint-config-next": {
|
"node_modules/eslint-config-next": {
|
||||||
"version": "14.1.0",
|
"version": "14.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.1.3.tgz",
|
||||||
"integrity": "sha512-SBX2ed7DoRFXC6CQSLc/SbLY9Ut6HxNB2wPTcoIWjUMd7aF7O/SIE7111L8FdZ9TXsNV4pulUDnfthpyPtbFUg==",
|
"integrity": "sha512-sUCpWlGuHpEhI0pIT0UtdSLJk5Z8E2DYinPTwsBiWaSYQomchdl0i60pjynY48+oXvtyWMQ7oE+G3m49yrfacg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@next/eslint-plugin-next": "14.1.0",
|
"@next/eslint-plugin-next": "14.1.3",
|
||||||
"@rushstack/eslint-patch": "^1.3.3",
|
"@rushstack/eslint-patch": "^1.3.3",
|
||||||
"@typescript-eslint/parser": "^5.4.2 || ^6.0.0",
|
"@typescript-eslint/parser": "^5.4.2 || ^6.0.0",
|
||||||
"eslint-import-resolver-node": "^0.3.6",
|
"eslint-import-resolver-node": "^0.3.6",
|
||||||
@@ -4278,11 +4278,11 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/next": {
|
"node_modules/next": {
|
||||||
"version": "14.1.0",
|
"version": "14.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/next/-/next-14.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/next/-/next-14.1.3.tgz",
|
||||||
"integrity": "sha512-wlzrsbfeSU48YQBjZhDzOwhWhGsy+uQycR8bHAOt1LY1bn3zZEcDyHQOEoN3aWzQ8LHCAJ1nqrWCc9XF2+O45Q==",
|
"integrity": "sha512-oexgMV2MapI0UIWiXKkixF8J8ORxpy64OuJ/J9oVUmIthXOUCcuVEZX+dtpgq7wIfIqtBwQsKEDXejcjTsan9g==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@next/env": "14.1.0",
|
"@next/env": "14.1.3",
|
||||||
"@swc/helpers": "0.5.2",
|
"@swc/helpers": "0.5.2",
|
||||||
"busboy": "1.6.0",
|
"busboy": "1.6.0",
|
||||||
"caniuse-lite": "^1.0.30001579",
|
"caniuse-lite": "^1.0.30001579",
|
||||||
@@ -4297,15 +4297,15 @@
|
|||||||
"node": ">=18.17.0"
|
"node": ">=18.17.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@next/swc-darwin-arm64": "14.1.0",
|
"@next/swc-darwin-arm64": "14.1.3",
|
||||||
"@next/swc-darwin-x64": "14.1.0",
|
"@next/swc-darwin-x64": "14.1.3",
|
||||||
"@next/swc-linux-arm64-gnu": "14.1.0",
|
"@next/swc-linux-arm64-gnu": "14.1.3",
|
||||||
"@next/swc-linux-arm64-musl": "14.1.0",
|
"@next/swc-linux-arm64-musl": "14.1.3",
|
||||||
"@next/swc-linux-x64-gnu": "14.1.0",
|
"@next/swc-linux-x64-gnu": "14.1.3",
|
||||||
"@next/swc-linux-x64-musl": "14.1.0",
|
"@next/swc-linux-x64-musl": "14.1.3",
|
||||||
"@next/swc-win32-arm64-msvc": "14.1.0",
|
"@next/swc-win32-arm64-msvc": "14.1.3",
|
||||||
"@next/swc-win32-ia32-msvc": "14.1.0",
|
"@next/swc-win32-ia32-msvc": "14.1.3",
|
||||||
"@next/swc-win32-x64-msvc": "14.1.0"
|
"@next/swc-win32-x64-msvc": "14.1.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@opentelemetry/api": "^1.1.0",
|
"@opentelemetry/api": "^1.1.0",
|
||||||
@@ -5064,9 +5064,9 @@
|
|||||||
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
||||||
},
|
},
|
||||||
"node_modules/react-virtuoso": {
|
"node_modules/react-virtuoso": {
|
||||||
"version": "4.7.0",
|
"version": "4.7.1",
|
||||||
"resolved": "https://registry.npmjs.org/react-virtuoso/-/react-virtuoso-4.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-virtuoso/-/react-virtuoso-4.7.1.tgz",
|
||||||
"integrity": "sha512-cpgvI1rSOETGDMhqVAVDuH+XHbWO1uIGKv5I6l4CyC71xWYUeGrE5n7sgTZklROB4+Vbv85pcgfWloTlY48HGQ==",
|
"integrity": "sha512-V1JIZLEwgX7R+YNkbY8dq6NcnIGKGWXe4mnMJJPsA2L4qeFKst0LY3mDk6sBCJyKRbMzYFxTZWyTT4QsA1JvVQ==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10"
|
"node": ">=10"
|
||||||
},
|
},
|
||||||
@@ -5906,9 +5906,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tiny-invariant": {
|
"node_modules/tiny-invariant": {
|
||||||
"version": "1.3.1",
|
"version": "1.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz",
|
||||||
"integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw=="
|
"integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg=="
|
||||||
},
|
},
|
||||||
"node_modules/tiny-warning": {
|
"node_modules/tiny-warning": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
@@ -6069,9 +6069,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "5.3.3",
|
"version": "5.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz",
|
||||||
"integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
|
"integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
|
|||||||
+16
-15
@@ -11,6 +11,7 @@
|
|||||||
"build": "next build",
|
"build": "next build",
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"lint": "eslint . --ext .ts,.tsx",
|
"lint": "eslint . --ext .ts,.tsx",
|
||||||
|
"prettify": "prettier --write **/*.tsx",
|
||||||
"preserve": "npm run build",
|
"preserve": "npm run build",
|
||||||
"serve": "npx serve out",
|
"serve": "npx serve out",
|
||||||
"presync": "npm run build",
|
"presync": "npm run build",
|
||||||
@@ -19,37 +20,37 @@
|
|||||||
"ios": "npx cap run ios"
|
"ios": "npx cap run ios"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@capacitor/android": "5.7.0",
|
"@capacitor/android": "5.7.2",
|
||||||
"@capacitor/core": "5.7.0",
|
"@capacitor/core": "5.7.2",
|
||||||
"@capacitor/ios": "5.7.0",
|
"@capacitor/ios": "5.7.2",
|
||||||
"@capacitor/status-bar": "5.0.7",
|
"@capacitor/status-bar": "5.0.7",
|
||||||
"@ionic/react": "7.7.3",
|
"@ionic/react": "7.7.4",
|
||||||
"@ionic/react-router": "7.7.3",
|
"@ionic/react-router": "7.7.4",
|
||||||
"classnames": "2.5.1",
|
"classnames": "2.5.1",
|
||||||
"next": "14.1.0",
|
"next": "14.1.3",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"react-router": "5.3.4",
|
"react-router": "5.3.4",
|
||||||
"react-router-dom": "5.3.4",
|
"react-router-dom": "5.3.4",
|
||||||
"react-virtuoso": "4.7.0"
|
"react-virtuoso": "4.7.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@capacitor/cli": "5.7.0",
|
"@capacitor/cli": "5.7.2",
|
||||||
"@types/jest": "29.5.12",
|
"@types/jest": "29.5.12",
|
||||||
"@types/node": "20.11.19",
|
"@types/node": "20.11.25",
|
||||||
"@types/react": "18.2.57",
|
"@types/react": "18.2.64",
|
||||||
"@types/react-dom": "18.2.19",
|
"@types/react-dom": "18.2.21",
|
||||||
"@types/react-router-dom": "5.3.3",
|
"@types/react-router-dom": "5.3.3",
|
||||||
"@types/react-router": "5.1.20",
|
"@types/react-router": "5.1.20",
|
||||||
"autoprefixer": "10.4.17",
|
"autoprefixer": "10.4.18",
|
||||||
"eslint": "8.56.0",
|
"eslint": "8.57.0",
|
||||||
"eslint-config-next": "14.1.0",
|
"eslint-config-next": "14.1.3",
|
||||||
"ionicons": "7.2.2",
|
"ionicons": "7.2.2",
|
||||||
"postcss": "8.4.35",
|
"postcss": "8.4.35",
|
||||||
"prettier": "3.2.5",
|
"prettier": "3.2.5",
|
||||||
"pullstate": "1.25",
|
"pullstate": "1.25",
|
||||||
"reselect": "5.1.0",
|
"reselect": "5.1.0",
|
||||||
"tailwindcss": "3.4.1",
|
"tailwindcss": "3.4.1",
|
||||||
"typescript": "5.3.3"
|
"typescript": "5.4.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
+8
-4
@@ -21,13 +21,17 @@ export const setSettings = (settings: Settings) => {
|
|||||||
|
|
||||||
// App-specific actions
|
// App-specific actions
|
||||||
|
|
||||||
export const setDone = (list: TodoListItem, item: ListItem, done: boolean) => {
|
export const setDone = (
|
||||||
|
list: TodoListItem,
|
||||||
|
listItem: ListItem,
|
||||||
|
done: boolean,
|
||||||
|
) => {
|
||||||
Store.update((s, o) => {
|
Store.update((s, o) => {
|
||||||
const listIndex = o.lists.findIndex(l => l === list);
|
const listIndex = o.lists.findIndex(l => l === list);
|
||||||
const items = o.lists[listIndex].items;
|
const items = o.lists[listIndex].items;
|
||||||
if(!items) return;
|
const itemIndex = items?.findIndex(i => i === listItem);
|
||||||
const itemIndex = items.findIndex(i => i === item);
|
const item = items?.[itemIndex ?? -1];
|
||||||
const item = items[itemIndex];
|
if (!item) return;
|
||||||
item.done = done;
|
item.done = done;
|
||||||
if (list === o.selectedList) {
|
if (list === o.selectedList) {
|
||||||
s.selectedList = s.lists[listIndex];
|
s.selectedList = s.lists[listIndex];
|
||||||
|
|||||||
Reference in New Issue
Block a user