diff --git a/.gitignore b/.gitignore index 0e796c3f1..b5dc16ac6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules dist -build \ No newline at end of file +build +.vercel diff --git a/samples/todo/components/BreadCrumb.tsx b/samples/todo/components/BreadCrumb.tsx index a02c08a24..98e233c4e 100644 --- a/samples/todo/components/BreadCrumb.tsx +++ b/samples/todo/components/BreadCrumb.tsx @@ -1,7 +1,7 @@ import { useList } from '@zenstackhq/runtime/hooks'; import Link from 'next/link'; import { useRouter } from 'next/router'; -import { useCurrentSpace } from 'pages/context'; +import { useCurrentSpace } from '@lib/context'; export default function BreadCrumb() { const router = useRouter(); diff --git a/samples/todo/components/SpaceMembers.tsx b/samples/todo/components/SpaceMembers.tsx index 9be76c06c..1b0606633 100644 --- a/samples/todo/components/SpaceMembers.tsx +++ b/samples/todo/components/SpaceMembers.tsx @@ -1,5 +1,5 @@ import { useSpaceUser } from '@zenstackhq/runtime/hooks'; -import { useCurrentSpace } from 'pages/context'; +import { useCurrentSpace } from '@lib/context'; import { PlusIcon } from '@heroicons/react/24/outline'; import Avatar from './Avatar'; import ManageMembers from './ManageMembers'; diff --git a/samples/todo/pages/context.ts b/samples/todo/lib/context.ts similarity index 100% rename from samples/todo/pages/context.ts rename to samples/todo/lib/context.ts diff --git a/samples/todo/pages/_app.tsx b/samples/todo/pages/_app.tsx index 8a02e1ce0..454cf9caf 100644 --- a/samples/todo/pages/_app.tsx +++ b/samples/todo/pages/_app.tsx @@ -9,7 +9,7 @@ import { useCurrentSpace, useCurrentUser, UserContext, -} from './context'; +} from '@lib/context'; function AppContent(props: { children: JSX.Element | JSX.Element[] }) { const user = useCurrentUser(); diff --git a/samples/todo/pages/space/[slug]/[listId]/index.tsx b/samples/todo/pages/space/[slug]/[listId]/index.tsx index 73ca504e6..e63aacf69 100644 --- a/samples/todo/pages/space/[slug]/[listId]/index.tsx +++ b/samples/todo/pages/space/[slug]/[listId]/index.tsx @@ -2,7 +2,7 @@ import { useList, useTodo } from '@zenstackhq/runtime/hooks'; import { useRouter } from 'next/router'; import { PlusIcon } from '@heroicons/react/24/outline'; import { ChangeEvent, KeyboardEvent, useState } from 'react'; -import { useCurrentUser } from 'pages/context'; +import { useCurrentUser } from '@lib/context'; import TodoComponent from 'components/Todo'; import BreadCrumb from 'components/BreadCrumb'; diff --git a/samples/todo/pages/space/[slug]/index.tsx b/samples/todo/pages/space/[slug]/index.tsx index 277fd5f73..a4dee0cd3 100644 --- a/samples/todo/pages/space/[slug]/index.tsx +++ b/samples/todo/pages/space/[slug]/index.tsx @@ -1,4 +1,4 @@ -import { SpaceContext, UserContext } from '../../context'; +import { SpaceContext, UserContext } from '@lib/context'; import { ChangeEvent, FormEvent, useContext, useState } from 'react'; import { useList } from '@zenstackhq/runtime/hooks'; import { toast } from 'react-toastify';