Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions apps/events/src/components/add-event.tsx

This file was deleted.

35 changes: 0 additions & 35 deletions apps/events/src/components/add-user.tsx

This file was deleted.

24 changes: 0 additions & 24 deletions apps/events/src/components/automerge-app.tsx

This file was deleted.

57 changes: 0 additions & 57 deletions apps/events/src/components/events.tsx

This file was deleted.

41 changes: 0 additions & 41 deletions apps/events/src/components/space.tsx

This file was deleted.

49 changes: 49 additions & 0 deletions apps/events/src/components/todos-app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { useState } from 'react';
import { useCreateEntity, useDeleteEntity, useQuery, useUpdateEntity } from '../schema';
import { Button } from './ui/button';
import { Input } from './ui/input';

export const TodosApp = () => {
const createEntity = useCreateEntity();
const updateEntity = useUpdateEntity();
const deleteEntity = useDeleteEntity();
const todos = useQuery({ types: ['Todo'] });
const [newTodoTitle, setNewTodoTitle] = useState('');

return (
<div>
<h1>Todos</h1>
<div className="flex flex-row gap-2">
<Input type="text" value={newTodoTitle} onChange={(e) => setNewTodoTitle(e.target.value)} />
<Button
onClick={() => {
createEntity({
types: ['Todo'],
data: { title: newTodoTitle, completed: false },
});
setNewTodoTitle('');
}}
>
Create Todo
</Button>
</div>
{todos.map((todo) => (
<div key={todo.id} className="flex flex-row items-center gap-2">
<h2>{todo.title}</h2>
<input
type="checkbox"
checked={todo.completed}
onChange={(e) =>
updateEntity({
id: todo.id,
types: ['Todo'],
data: { completed: e.target.checked },
})
}
/>
<Button onClick={() => deleteEntity(todo.id)}>Delete</Button>
</div>
))}
</div>
);
};
17 changes: 0 additions & 17 deletions apps/events/src/components/users.tsx

This file was deleted.

40 changes: 2 additions & 38 deletions apps/events/src/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { createFileRoute } from '@tanstack/react-router'
// Import Routes

import { Route as rootRoute } from './routes/__root'
import { Route as Schema2Import } from './routes/schema2'
import { Route as PlaygroundImport } from './routes/playground'
import { Route as IndexImport } from './routes/index'
import { Route as SpaceSpaceIdImport } from './routes/space/$spaceId'
Expand All @@ -37,12 +36,6 @@ const LoginLazyRoute = LoginLazyImport.update({
getParentRoute: () => rootRoute,
} as any).lazy(() => import('./routes/login.lazy').then((d) => d.Route))

const Schema2Route = Schema2Import.update({
id: '/schema2',
path: '/schema2',
getParentRoute: () => rootRoute,
} as any)

const PlaygroundRoute = PlaygroundImport.update({
id: '/playground',
path: '/playground',
Expand Down Expand Up @@ -79,13 +72,6 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof PlaygroundImport
parentRoute: typeof rootRoute
}
'/schema2': {
id: '/schema2'
path: '/schema2'
fullPath: '/schema2'
preLoaderRoute: typeof Schema2Import
parentRoute: typeof rootRoute
}
'/login': {
id: '/login'
path: '/login'
Expand Down Expand Up @@ -115,7 +101,6 @@ declare module '@tanstack/react-router' {
export interface FileRoutesByFullPath {
'/': typeof IndexRoute
'/playground': typeof PlaygroundRoute
'/schema2': typeof Schema2Route
'/login': typeof LoginLazyRoute
'/login2': typeof Login2LazyRoute
'/space/$spaceId': typeof SpaceSpaceIdRoute
Expand All @@ -124,7 +109,6 @@ export interface FileRoutesByFullPath {
export interface FileRoutesByTo {
'/': typeof IndexRoute
'/playground': typeof PlaygroundRoute
'/schema2': typeof Schema2Route
'/login': typeof LoginLazyRoute
'/login2': typeof Login2LazyRoute
'/space/$spaceId': typeof SpaceSpaceIdRoute
Expand All @@ -134,34 +118,20 @@ export interface FileRoutesById {
__root__: typeof rootRoute
'/': typeof IndexRoute
'/playground': typeof PlaygroundRoute
'/schema2': typeof Schema2Route
'/login': typeof LoginLazyRoute
'/login2': typeof Login2LazyRoute
'/space/$spaceId': typeof SpaceSpaceIdRoute
}

export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
fullPaths:
| '/'
| '/playground'
| '/schema2'
| '/login'
| '/login2'
| '/space/$spaceId'
fullPaths: '/' | '/playground' | '/login' | '/login2' | '/space/$spaceId'
fileRoutesByTo: FileRoutesByTo
to:
| '/'
| '/playground'
| '/schema2'
| '/login'
| '/login2'
| '/space/$spaceId'
to: '/' | '/playground' | '/login' | '/login2' | '/space/$spaceId'
id:
| '__root__'
| '/'
| '/playground'
| '/schema2'
| '/login'
| '/login2'
| '/space/$spaceId'
Expand All @@ -171,7 +141,6 @@ export interface FileRouteTypes {
export interface RootRouteChildren {
IndexRoute: typeof IndexRoute
PlaygroundRoute: typeof PlaygroundRoute
Schema2Route: typeof Schema2Route
LoginLazyRoute: typeof LoginLazyRoute
Login2LazyRoute: typeof Login2LazyRoute
SpaceSpaceIdRoute: typeof SpaceSpaceIdRoute
Expand All @@ -180,7 +149,6 @@ export interface RootRouteChildren {
const rootRouteChildren: RootRouteChildren = {
IndexRoute: IndexRoute,
PlaygroundRoute: PlaygroundRoute,
Schema2Route: Schema2Route,
LoginLazyRoute: LoginLazyRoute,
Login2LazyRoute: Login2LazyRoute,
SpaceSpaceIdRoute: SpaceSpaceIdRoute,
Expand All @@ -198,7 +166,6 @@ export const routeTree = rootRoute
"children": [
"/",
"/playground",
"/schema2",
"/login",
"/login2",
"/space/$spaceId"
Expand All @@ -210,9 +177,6 @@ export const routeTree = rootRoute
"/playground": {
"filePath": "playground.tsx"
},
"/schema2": {
"filePath": "schema2.tsx"
},
"/login": {
"filePath": "login.lazy.tsx"
},
Expand Down
Loading
Loading