Skip to content

Commit 392cdc0

Browse files
committed
feat: restructure project folder
1 parent 5ae3276 commit 392cdc0

File tree

49 files changed

+52
-85
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+52
-85
lines changed

apps/web/src/actions/auth/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { Prisma } from "database"
66
import { createUser } from "database/src/users/queries"
77
import { sendEmail } from "emails"
88
import VerifyEmail from "emails/verify-email"
9-
109
import { redirect } from "utils/navigation"
1110

1211
import { SignUpDataOutput, signUpSchema } from "./type"

apps/web/src/actions/protect/postAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { revalidatePath } from "next/cache"
44
import { redirect } from "next/navigation"
55

66
import { auth } from "configs/auth"
7+
import APP_ROUTES from "constants/routes"
78
import prisma, {
89
createPost,
910
PostOnUserType,
@@ -15,7 +16,6 @@ import prisma, {
1516
} from "database"
1617
import { toast } from "react-toastify"
1718

18-
import APP_ROUTES from "constants/routes"
1919
import { TUserItem, userSelect } from "@/types/users"
2020

2121
// TODO: move to database package

apps/web/src/app/[lang]/(auth)/signin/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ import React from "react"
22
import { redirect } from "next/navigation"
33

44
import { auth } from "configs/auth"
5-
import { getTranslations } from "next-intl/server"
6-
75
import SignIn from "molecules/auth/sign-in"
6+
import { getTranslations } from "next-intl/server"
87

98
export async function generateMetadata() {
109
const t = await getTranslations()

apps/web/src/app/[lang]/(protected)/user/posts/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { Metadata } from "next/types"
33

44
import { auth } from "configs/auth"
55
import { getUser } from "database"
6-
76
import PageTitle from "molecules/page-title"
87

98
export async function generateMetadata(): Promise<Metadata> {

apps/web/src/app/[lang]/(protected)/user/profile/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { auth } from "configs/auth"
2-
32
import APP_APIS from "constants/apis"
43
import PageTitle from "molecules/page-title"
54
import Profile from "molecules/profile"

apps/web/src/app/[lang]/(protected-post)/user/posts/[postId]/edit/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Metadata } from "next"
22

33
import { getPost } from "database"
4-
54
import PostForm from "molecules/post-form"
65

76
export async function generateMetadata(props): Promise<Metadata> {

apps/web/src/app/[lang]/(protected-post)/user/posts/create/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { redirect } from "next/navigation"
22

33
import { auth } from "configs/auth"
4-
54
import APP_ROUTES from "constants/routes"
65
import PostForm from "molecules/post-form"
76

apps/web/src/app/[lang]/(public)/layout.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { BookCopy, HomeIcon, Smartphone, TagIcon } from "lucide-react"
2-
import { useTranslations } from "next-intl"
3-
42
import SidebarItem, { SidebarItemProps } from "molecules/sidebar-item"
53
import SquareAdvertisement from "molecules/square-advertisement"
64
import TopTag from "molecules/top-tags"
5+
import { useTranslations } from "next-intl"
76

87
export default function PublicLayout({ children }: { children: React.ReactNode }) {
98
const t = useTranslations("common")

apps/web/src/app/[lang]/(public)/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ import { Suspense } from "react"
22
import { Metadata } from "next"
33

44
import { PostStatus } from "database"
5-
import { PostSkeleton } from "ui"
6-
75
import Filter from "molecules/home/filter"
86
import PostList from "molecules/posts/post-list"
7+
import { PostSkeleton } from "ui"
98

109
export const metadata: Metadata = {
1110
title: "Next-forum - Share the best things",

apps/web/src/app/[lang]/(public)/search/page.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import { Metadata } from "next"
22

3-
import { getTranslations } from "next-intl/server"
4-
import { Typography } from "ui"
5-
63
import Filter from "molecules/home/filter"
74
import SearchBar from "molecules/nav/search-bar"
85
import PostList from "molecules/posts/post-list"
6+
import { getTranslations } from "next-intl/server"
7+
import { Typography } from "ui"
98

109
export async function generateMetadata(props): Promise<Metadata> {
1110
const searchParams = await props.searchParams

0 commit comments

Comments
 (0)