Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
alan2207 committed Aug 18, 2024
1 parent 00d7b16 commit 35024cd
Show file tree
Hide file tree
Showing 17 changed files with 15 additions and 30 deletions.
2 changes: 1 addition & 1 deletion apps/nextjs-pages/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ yarn-error.log*
mocked-db.json

/.next

/.vite
tsconfig.tsbuildinfo
1 change: 0 additions & 1 deletion apps/nextjs-pages/.vite/vitest/results.json

This file was deleted.

4 changes: 1 addition & 3 deletions apps/nextjs-pages/src/application/pages/app/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ContentLayout, DashboardLayout } from '@/components/layouts';
import { useUser } from '@/lib/auth';
import { ROLES } from '@/lib/authorization';

const DashboardPage = () => {
export const DashboardPage = () => {
const user = useUser();
if (!user.data) return null;

Expand Down Expand Up @@ -43,5 +43,3 @@ DashboardPage.getLayout = (page: ReactElement) => {
</DashboardLayout>
);
};

export default DashboardPage;
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from '@/testing/test-utils';
import { formatDate } from '@/utils/format';

import DiscussionsPage from '../discussions';
import { DiscussionsPage } from '../discussions';

beforeAll(() => {
vi.spyOn(console, 'error').mockImplementation(() => {});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ DiscussionPage.getLayout = (page: ReactElement) => {
return <DashboardLayout>{page}</DashboardLayout>;
};

export default DiscussionPage;

export const PublicDiscussionPage = ({
dehydratedState,
}: InferGetServerSidePropsType<typeof getServerSideProps>) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { getInfiniteCommentsQueryOptions } from '@/features/comments/api/get-com
import { CreateDiscussion } from '@/features/discussions/components/create-discussion';
import { DiscussionsList } from '@/features/discussions/components/discussions-list';

const DiscussionsPage = () => {
export const DiscussionsPage = () => {
const queryClient = useQueryClient();

return (
Expand Down Expand Up @@ -35,5 +35,3 @@ DiscussionsPage.getLayout = (page: ReactElement) => {
</DashboardLayout>
);
};

export default DiscussionsPage;
4 changes: 1 addition & 3 deletions apps/nextjs-pages/src/application/pages/app/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Entry = ({ label, value }: EntryProps) => (
</div>
);

const ProfilePage = () => {
export const ProfilePage = () => {
const user = useUser();

if (!user.data) return null;
Expand Down Expand Up @@ -55,5 +55,3 @@ ProfilePage.getLayout = (page: ReactElement) => {
</DashboardLayout>
);
};

export default ProfilePage;
4 changes: 1 addition & 3 deletions apps/nextjs-pages/src/application/pages/app/users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ContentLayout, DashboardLayout } from '@/components/layouts';
import { UsersList } from '@/features/users/components/users-list';
import { Authorization, ROLES } from '@/lib/authorization';

const UsersPage = () => {
export const UsersPage = () => {
return (
<ContentLayout title="Users">
<Authorization
Expand All @@ -24,5 +24,3 @@ UsersPage.getLayout = (page: ReactElement) => {
</DashboardLayout>
);
};

export default UsersPage;
4 changes: 1 addition & 3 deletions apps/nextjs-pages/src/application/pages/auth/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ReactElement } from 'react';
import { AuthLayout } from '@/components/layouts/auth-layout';
import { LoginForm } from '@/features/auth/components/login-form';

const LoginPage = () => {
export const LoginPage = () => {
const router = useRouter();
const { redirectTo } = router.query;

Expand All @@ -20,5 +20,3 @@ const LoginPage = () => {
LoginPage.getLayout = (page: ReactElement) => {
return <AuthLayout title="Log in to your account">{page}</AuthLayout>;
};

export default LoginPage;
4 changes: 1 addition & 3 deletions apps/nextjs-pages/src/application/pages/auth/register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AuthLayout } from '@/components/layouts/auth-layout';
import { RegisterForm } from '@/features/auth/components/register-form';
import { useTeams } from '@/features/teams/api/get-teams';

const RegisterPage = () => {
export const RegisterPage = () => {
const router = useRouter();

const { redirectTo } = router.query;
Expand Down Expand Up @@ -33,5 +33,3 @@ const RegisterPage = () => {
RegisterPage.getLayout = (page: ReactElement) => {
return <AuthLayout title="Register your account">{page}</AuthLayout>;
};

export default RegisterPage;
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from '@/application/pages/app/discussions/discussion';
export { DiscussionPage as default } from '@/application/pages/app/discussions/discussion';
2 changes: 1 addition & 1 deletion apps/nextjs-pages/src/pages/app/discussions/index.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from '@/application/pages/app/discussions/discussions';
export { DiscussionsPage as default } from '@/application/pages/app/discussions/discussions';
2 changes: 1 addition & 1 deletion apps/nextjs-pages/src/pages/app/index.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from '@/application/pages/app/dashboard';
export { DashboardPage as default } from '@/application/pages/app/dashboard';
2 changes: 1 addition & 1 deletion apps/nextjs-pages/src/pages/app/profile.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from '@/application/pages/app/profile';
export { ProfilePage as default } from '@/application/pages/app/profile';
2 changes: 1 addition & 1 deletion apps/nextjs-pages/src/pages/app/users.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from '@/application/pages/app/users';
export { UsersPage as default } from '@/application/pages/app/users';
2 changes: 1 addition & 1 deletion apps/nextjs-pages/src/pages/auth/login.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from '@/application/pages/auth/login';
export { LoginPage as default } from '@/application/pages/auth/login';
2 changes: 1 addition & 1 deletion apps/nextjs-pages/src/pages/auth/register.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from '@/application/pages/auth/register';
export { RegisterPage as default } from '@/application/pages/auth/register';

0 comments on commit 35024cd

Please sign in to comment.