Skip to content

Commit

Permalink
[IFMD-62] feat: move use cases to the application layer and providers…
Browse files Browse the repository at this point in the history
… to the presentation layer (#29)

* feat: move use cases to the application layer and providers to the presentation layer

* update tsconfig
  • Loading branch information
Javimtib92 authored Sep 26, 2024
1 parent c6d8f65 commit c939ba3
Show file tree
Hide file tree
Showing 16 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/posts/presentation/pages/create-post/create-post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { TYPES } from "@/src/shared/ioc/__generated__/types";
import { debounce } from "lodash";
import { Switch } from "@/src/shared/presentation/components/switch/switch";
import { useAsyncState } from "@front_web_mrmilu/hooks";
import type { CreatePostUseCase } from "@/src/posts/domain/use-cases/create-post-use-case";
import type { CreatePostUseCase } from "@/src/posts/application/use-cases/create-post-use-case";
import { locator } from "@/src/shared/ioc/__generated__";
import css from "@/src/shared/presentation/styles/wrapper.css";

Expand Down
2 changes: 1 addition & 1 deletion src/posts/presentation/pages/posts/posts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import css from "@/src/shared/presentation/styles/wrapper.css";
import { SimpleCard } from "@/src/shared/presentation/components/simple-card/simple-card";
import { locator } from "@/src/shared/ioc/__generated__";
import type { IocProvider } from "@/src/shared/ioc/interfaces";
import type { GetPostsUseCase } from "@/src/posts/domain/use-cases/get-posts-use-case";
import type { GetPostsUseCase } from "@/src/posts/application/use-cases/get-posts-use-case";
import { TYPES } from "@/src/shared/ioc/__generated__/types";
import type { Post } from "@/src/posts/domain/models/post";
import { notFound } from "next/navigation";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";
import css from "./main-loader.css";
import { easings, useTransition, animated } from "@react-spring/web";
import { useUiProvider } from "@/src/shared/application/providers/ui.provider";
import { useUiProvider } from "@/src/shared/presentation/providers/ui.provider";
import { Loader } from "@/src/shared/presentation/components/loader/loader";

export const MainLoader = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/presentation/components/modal/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { PropsWithChildren, ReactElement } from "react";
import { cloneElement, forwardRef, useEffect, useRef, useState } from "react";
import { useTransition, animated, easings } from "@react-spring/web";
import { Close as CloseIcon } from "assets/icons";
import { useUiProvider } from "@/src/shared/application/providers/ui.provider";
import { useUiProvider } from "@/src/shared/presentation/providers/ui.provider";
import { useClickOutside } from "@front_web_mrmilu/hooks";
import css from "./modal.css";
import { IconButton } from "@/src/shared/presentation/components/icon-button/icon-button";
Expand Down
4 changes: 2 additions & 2 deletions src/shared/presentation/containers/login-button.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"use client";
import { Button } from "@/src/shared/presentation/components/button/button";
import { useUserStore } from "@/src/users/application/stores/user-store";
import { useUserStore } from "@/src/users/presentation/stores/user-store";
import React, { useEffect } from "react";
import { LoggingModal } from "@/src/shared/presentation/components/logging-modal/logging-modal";
import { CookieUtils } from "@front_web_mrmilu/utils";
import { useUiProvider } from "@/src/shared/application/providers/ui.provider";
import { useUiProvider } from "@/src/shared/presentation/providers/ui.provider";
import { useSearchParams } from "next/navigation";

export default function LoginButton() {
Expand Down
2 changes: 1 addition & 1 deletion src/users/presentation/components/user-row.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";
import { SimpleCard } from "@/src/shared/presentation/components/simple-card/simple-card";
import { useUiProvider } from "@/src/shared/application/providers/ui.provider";
import { useUiProvider } from "@/src/shared/presentation/providers/ui.provider";
import { User } from "@/src/users/domain/models/user";
import { UserModal } from "@/src/users/presentation/components/user-modal/user-modal";
import { useMemo } from "react";
Expand Down
4 changes: 2 additions & 2 deletions src/users/presentation/containers/users-list.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";
import { useUiProvider } from "@/src/shared/application/providers/ui.provider";
import { useUsersListProvider } from "@/src/users/application/providers/user-list-provider";
import { useUiProvider } from "@/src/shared/presentation/providers/ui.provider";
import { useUsersListProvider } from "@/src/users/presentation/providers/user-list-provider";
import type { User } from "@/src/users/domain/models/user";
import { UserModal } from "@/src/users/presentation/components/user-modal/user-modal";
import { SimpleCard } from "@/src/shared/presentation/components/simple-card/simple-card";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import css from "@/src/shared/presentation/styles/wrapper.css";
import { locator } from "@/src/shared/ioc/__generated__";
import type { IocProvider } from "@/src/shared/ioc/interfaces";
import type { GetUsersUseCase } from "@/src/users/domain/use-cases/get-users-use-case";
import type { GetUsersUseCase } from "@/src/users/application/use-cases/get-users-use-case";
import { TYPES } from "@/src/shared/ioc/__generated__/types";
import UsersList from "@/src/users/presentation/containers/users-list";
import { instanceToPlain } from "class-transformer";
import type { User } from "@/src/users/domain/models/user";
import UsersListProvider from "@/src/users/application/providers/user-list-provider";
import UsersListProvider from "@/src/users/presentation/providers/user-list-provider";
import PageTitle from "@/src/shared/presentation/components/page-title/page-title";
import { getTranslations } from "next-intl/server";
import { notFound } from "next/navigation";
Expand Down
2 changes: 1 addition & 1 deletion src/users/presentation/pages/users/users.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import css from "@/src/shared/presentation/styles/wrapper.css";
import { locator } from "@/src/shared/ioc/__generated__";
import type { IocProvider } from "@/src/shared/ioc/interfaces";
import type { GetUsersUseCase } from "@/src/users/domain/use-cases/get-users-use-case";
import type { GetUsersUseCase } from "@/src/users/application/use-cases/get-users-use-case";
import { TYPES } from "@/src/shared/ioc/__generated__/types";
import UserRow from "@/src/users/presentation/components/user-row";
import PageTitle from "@/src/shared/presentation/components/page-title/page-title";
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"baseUrl": ".",
"paths": {
"@/ioc/*": [
"src/common/ioc/*"
"src/shared/ioc/*"
],
"@/src/*": [
"src/*"
Expand Down

0 comments on commit c939ba3

Please sign in to comment.