Skip to content

Commit ba7a7ff

Browse files
committed
refactor import
1 parent f576e3c commit ba7a7ff

File tree

90 files changed

+318
-397
lines changed

Some content is hidden

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

90 files changed

+318
-397
lines changed

apps/docs/app/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import { Button, Header } from "ui"
1+
import { Button } from "ui"
22

33
export default function Page() {
44
return (
55
<>
6-
<Header text="Docs" />
76
<Button />
87
</>
98
)

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
"use server"
22

33
import bcryptjs from "bcryptjs"
4-
import { signIn, signOut } from "configs/auth"
54
import { Prisma } from "database"
65
import { createUser } from "database/src/users/queries"
7-
import { sendEmail } from "emails"
86
import VerifyEmail from "emails/verify-email"
9-
import { redirect } from "utils/navigation"
7+
8+
import { signIn, signOut } from "@/configs/auth"
9+
import { sendEmail } from "@/emails"
10+
import { redirect } from "@/utils/navigation"
1011

1112
import { SignUpDataOutput, signUpSchema } from "./type"
1213

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import { revalidatePath } from "next/cache"
44
import { redirect } from "next/navigation"
55

6-
import { auth } from "configs/auth"
7-
import APP_ROUTES from "constants/routes"
86
import prisma, {
97
createPost,
108
PostOnUserType,
@@ -15,11 +13,14 @@ import prisma, {
1513
updatePost,
1614
updatePostStatus,
1715
} from "database"
18-
import { ActionState, validatedActionWithUser } from "libs/validationAction"
1916
import { toast } from "react-toastify"
20-
import { TUserItem, userSelect } from "types/users"
2117
import * as z from "zod"
2218

19+
import { auth } from "@/configs/auth"
20+
import APP_ROUTES from "@/constants/routes"
21+
import { ActionState, validatedActionWithUser } from "@/libs/validationAction"
22+
import { TUserItem, userSelect } from "@/types/users"
23+
2324
export const getTotalActions = async ({
2425
postId,
2526
actionType,

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

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

4-
import { auth } from "configs/auth"
5-
import SignIn from "molecules/auth/sign-in"
64
import { getTranslations } from "next-intl/server"
75

6+
import { auth } from "@/configs/auth"
7+
import SignIn from "@/molecules/auth/sign-in"
8+
89
export async function generateMetadata() {
910
const t = await getTranslations()
1011

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react"
22

3-
import SignUp from "molecules/auth/sign-up"
3+
import SignUp from "@/molecules/auth/sign-up"
44

55
const RegisterPage: React.FC = () => {
66
return (

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import SidebarItem, { SidebarItemProps } from "molecules/sidebar-item"
1+
import SidebarItem, { SidebarItemProps } from "@/molecules/sidebar-item"
22

33
const SIDE_BAR = [
44
{

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import React from "react"
22
import { Metadata } from "next/types"
33

4-
import { auth } from "configs/auth"
54
import { getUser } from "database"
6-
import PageTitle from "molecules/page-title"
5+
6+
import { auth } from "@/configs/auth"
7+
import PageTitle from "@/molecules/page-title"
78

89
export async function generateMetadata(): Promise<Metadata> {
910
const session = await auth()
10-
const user = await getUser({ userId: session?.user?.id })
11+
const user = await getUser({ where: { id: session?.user?.id } })
1112

1213
return {
1314
title: `Posts - ${user?.data?.name}`,

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { auth } from "configs/auth"
2-
import APP_APIS from "constants/apis"
3-
import PageTitle from "molecules/page-title"
4-
import Profile from "molecules/profile"
5-
import { generatePath } from "utils/generatePath"
1+
import { auth } from "@/configs/auth"
2+
import APP_APIS from "@/constants/apis"
3+
import PageTitle from "@/molecules/page-title"
4+
import Profile from "@/molecules/profile"
5+
import { generatePath } from "@/utils/generatePath"
66

77
export default async function Page() {
88
let currentUser = null

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

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

33
import { getPost } from "database"
4-
import PostForm from "molecules/post-form"
4+
5+
import PostForm from "@/molecules/post-form"
56

67
export async function generateMetadata(props): Promise<Metadata> {
78
const params = await props.params

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { redirect } from "next/navigation"
22

3-
import { auth } from "configs/auth"
4-
import APP_ROUTES from "constants/routes"
5-
import PostForm from "molecules/post-form"
3+
import { auth } from "@/configs/auth"
4+
import APP_ROUTES from "@/constants/routes"
5+
import PostForm from "@/molecules/post-form"
66

77
export const metadata = {
88
title: "Create Post",

0 commit comments

Comments
 (0)