switch to nx monorepo

This commit is contained in:
Philipinho
2024-01-09 18:58:26 +01:00
parent e1bb2632b8
commit 093e634c0b
273 changed files with 11419 additions and 31 deletions

View File

@ -0,0 +1,7 @@
interface AuthLayoutProps {
children: React.ReactNode
}
export default function AuthLayout({ children }: AuthLayoutProps) {
return <div>{children}</div>
}

View File

@ -0,0 +1,5 @@
import { LoginForm } from '@/features/auth/components/login-form';
export default function LoginPage() {
return <LoginForm />;
}

View File

@ -0,0 +1,5 @@
import { SignUpForm } from '@/features/auth/components/sign-up-form';
export default function SignUpPage() {
return <SignUpForm />;
}

View File

@ -0,0 +1,13 @@
import { Container } from '@mantine/core';
import HomeTabs from '@/features/home/components/home-tabs';
export default function Home() {
return (
<Container size={'800'} pt="xl">
<HomeTabs/>
</Container>
);
}

View File

@ -0,0 +1,27 @@
import { useParams } from 'react-router-dom';
import { usePageQuery } from '@/features/page/queries/page-query';
import { FullEditor } from '@/features/editor/full-editor';
import HistoryModal from '@/features/page-history/components/history-modal';
export default function Page() {
const { pageId } = useParams();
const { data, isLoading, isError } = usePageQuery(pageId);
if (isLoading) {
return <></>;
}
if (isError || !data) { // TODO: fix this
return <div>Error fetching page data.</div>;
}
return (
data && (
<div>
<FullEditor pageId={pageId} title={data.title} />
<HistoryModal />
</div>
)
);
}

View File

@ -0,0 +1,23 @@
import { Title, Text, Stack } from '@mantine/core';
import { ThemeToggle } from '@/components/theme-toggle';
export function Welcome() {
return (
<Stack>
<Title ta="center" mt={100}>
<Text
inherit
variant="gradient"
component="span"
gradient={{ from: 'pink', to: 'yellow' }}
>
Welcome
</Text>
</Title>
<Text ta="center" size="lg" maw={580} mx="auto" mt="xl">
Welcome to something new and interesting.
</Text>
<ThemeToggle />
</Stack>
);
}