Skip to content

Commit

Permalink
refactor(structure): update project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdi-parvizi committed Nov 20, 2024
1 parent 769aadf commit b85cf7c
Show file tree
Hide file tree
Showing 18 changed files with 14 additions and 8,409 deletions.
8,238 changes: 0 additions & 8,238 deletions web/package-lock.json

This file was deleted.

2 changes: 1 addition & 1 deletion web/src/components/internal-ui/ChatBox.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box } from "@chakra-ui/react";
import ChatBubble from "./ChatBubble";
import { Message } from "../../features/model";
import { Message } from "../../features/models";
import { Endpoints, UserType } from "../../features/constants";
import useGptStore from "../../utils/store";
import { useEffect } from "react";
Expand Down
110 changes: 0 additions & 110 deletions web/src/components/ui/menu.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Button, HStack, Stack } from "@chakra-ui/react";
import useGptStore from "../../utils/store";
import ChatBox from "../../components/internal-ui/ChatBox";

import { ApiRequestBasicGen, BasicGenFormData } from "../model";
import { ApiRequestBasicGen, BasicGenFormData } from "../models";

import { IoSendOutline } from "react-icons/io5";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import useFormHandler from "../../hooks/useFormHandler";
import { bugFixMapper } from "../../utils/mapperFunctions";
import useGptStore from "../../utils/store";
import { bugFixDefaultValues, BugFixFields, Endpoints } from "../constants";
import { ApiRequestBugFix, BugFixFormData } from "../model";
import { ApiRequestBugFix, BugFixFormData } from "../models";

const BugFix = () => {
const { request, handleSubmit, onSubmit, formMethods } = useFormHandler<
Expand Down
2 changes: 1 addition & 1 deletion web/src/features/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
TerraformEc2FormData,
TerraformIAMFormData,
TerraformS3FormData,
} from "./model";
} from "./models";

export enum TerraformServices {
DOCKER = "DOCKER",
Expand Down
45 changes: 0 additions & 45 deletions web/src/features/listDirectory/hooks.ts

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion web/src/features/terraform/components/Argocd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { TerraformServices } from "../../constants";
import {
ApiRequestTerraformArgocd,
TerraformArgocdFormData,
} from "../../model";
} from "../../models";

const Argocd = () => {
const { platform } = useFindPlatform(TerraformServices.ARGOCD);
Expand Down
2 changes: 1 addition & 1 deletion web/src/features/terraform/components/Docker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { TerraformServices } from "../../constants";
import {
ApiRequestTerraformDocker,
TerraformDockerFormData,
} from "../../model";
} from "../../models";

const Docker = () => {
const { platform } = useFindPlatform(TerraformServices.DOCKER);
Expand Down
2 changes: 1 addition & 1 deletion web/src/features/terraform/components/EC2.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PlatformBox from "../../../components/internal-ui/PlatformBox";
import useFindPlatform from "../../../hooks/useFindPlatform";
import { TerraformServices } from "../../constants";
import { ApiRequestTerraformEc2, TerraformEc2FormData } from "../../model";
import { ApiRequestTerraformEc2, TerraformEc2FormData } from "../../models";

const EC2 = () => {
const { platform } = useFindPlatform(TerraformServices.EC2);
Expand Down
2 changes: 1 addition & 1 deletion web/src/features/terraform/components/IAM.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PlatformBox from "../../../components/internal-ui/PlatformBox";
import useFindPlatform from "../../../hooks/useFindPlatform";
import { TerraformServices } from "../../constants";
import { ApiRequestTerraformIam, TerraformIAMFormData } from "../../model";
import { ApiRequestTerraformIam, TerraformIAMFormData } from "../../models";

const IAM = () => {
const { platform } = useFindPlatform(TerraformServices.IAM);
Expand Down
2 changes: 1 addition & 1 deletion web/src/features/terraform/components/S3.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PlatformBox from "../../../components/internal-ui/PlatformBox";
import useFindPlatform from "../../../hooks/useFindPlatform";
import { TerraformServices } from "../../constants";
import { ApiRequestTerraformS3, TerraformS3FormData } from "../../model";
import { ApiRequestTerraformS3, TerraformS3FormData } from "../../models";

export const S3 = () => {
const { platform } = useFindPlatform(TerraformServices.S3);
Expand Down
File renamed without changes.
2 changes: 0 additions & 2 deletions web/src/hooks/useDownload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ const useDownload = (folderName: string) => {
`/download-folder${folderName}/${nameGenerator(endpoint)}`;

downloadRef.current.href = url;
// downloadRef.current.target = "_blank";

downloadRef.current.click();
} catch (error) {
console.error("Error downloading file:", error);
Expand Down
6 changes: 3 additions & 3 deletions web/src/router.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { createBrowserRouter } from "react-router-dom";
import Layout from "./layouts/Layout";
import BasicGen from "./features/basicGen/BasicGen";
import BugFix from "./features/bugFix/BugFix";
import BasicGen from "./features/basicGen";
import BugFix from "./features/bugFix";
import ErrorPage from "./components/internal-ui/ErrorPage";
import { routes, terraformRoutes } from "./utils/routing";
import Terraform from "./features/terraform/Terraform";
import Terraform from "./features/terraform";
import Docker from "./features/terraform/components/Docker";
import EC2 from "./features/terraform/components/EC2";
import S3 from "./features/terraform/components/S3";
Expand Down
2 changes: 1 addition & 1 deletion web/src/utils/mapperFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
ApiRequestTerraformIam,
ApiRequestTerraformArgocd,
TerraformArgocdFormData,
} from "../features/model";
} from "../features/models";

export const basicGenMapper = (data: BasicGenFormData): ApiRequestBasicGen => ({
min_token: data.minToken,
Expand Down
2 changes: 1 addition & 1 deletion web/src/utils/store.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { create } from "zustand";
import { Endpoints, UserType } from "../features/constants";
import { Message } from "../features/model";
import { Message } from "../features/models";

interface GeneratorQuery {
isSuccess: boolean;
Expand Down

0 comments on commit b85cf7c

Please sign in to comment.