Skip to content

Commit

Permalink
Refactored
Browse files Browse the repository at this point in the history
- Removed unnecessary actions
- Moved actions
  • Loading branch information
mbeps committed Jul 18, 2023
1 parent ae9dfd0 commit 29881ac
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 115 deletions.
File renamed without changes.
File renamed without changes.
18 changes: 0 additions & 18 deletions actions/projects/getDescriptionBySlug.ts

This file was deleted.

19 changes: 0 additions & 19 deletions actions/projects/getImagesListBySlug.ts

This file was deleted.

18 changes: 0 additions & 18 deletions actions/projects/getLanguageBySlug.ts

This file was deleted.

15 changes: 0 additions & 15 deletions actions/projects/getNameBySlug.ts

This file was deleted.

15 changes: 0 additions & 15 deletions actions/projects/getRepoBySlug.ts

This file was deleted.

18 changes: 0 additions & 18 deletions actions/projects/getTechnologiesBySlug.ts

This file was deleted.

17 changes: 6 additions & 11 deletions app/projects/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import getDescriptionBySlug from "@/actions/projects/getDescriptionBySlug";
import getImagesListBySlug from "@/actions/projects/getImagesListBySlug";
import getLanguageBySlug from "@/actions/projects/getLanguageBySlug";
import getNameBySlug from "@/actions/projects/getNameBySlug";
import getProjectBySlug from "@/actions/projects/getProjectBySlug";
import getTechnologiesBySlug from "@/actions/projects/getTechnologiesBySlug";
import getProjectBySlug from "@/actions/getProjectBySlug";
import Tag from "@/components/Atoms/Tag";
import HeadingThree from "@/components/Content/Text/HeadingThree";
import HeadingTwo from "@/components/Content/Text/HeadingTwo";
Expand Down Expand Up @@ -69,12 +64,12 @@ const ProjectPage: React.FC<ProjectPageProps> = ({ params }) => {
];

const project = getProjectBySlug(slug, allProjects);
const projectName = getNameBySlug(slug, allProjects);
const projectTechnologies = getTechnologiesBySlug(slug, allProjects);
const projectLanguage = getLanguageBySlug(slug, allProjects);
const projectDescription = getDescriptionBySlug(slug, allProjects);
const projectName = project?.name;
const projectTechnologies = project?.technologies;
const projectLanguage = project?.programmingLanguage;
const projectDescription = project?.description;

let gallery = getImagesListBySlug(slug, allProjects);
let gallery = project?.imagesList;
// Adds full path to images
if (gallery) {
gallery = gallery.map((image) => `/projects/${slug}/${image}`);
Expand Down
2 changes: 1 addition & 1 deletion components/Modal/LanguageModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Tag from "../Atoms/Tag";
import HeadingThree from "../Content/Text/HeadingThree";
import Dropdown from "../DropDown/DropDownMenu";
import Modal from "./Modal";
import organizeSkillsByCategory from "@/actions/organize/organizeSkillsByCategory";
import organizeSkillsByCategory from "@/actions/organizeSkillsByCategory";

interface ProjectModalProps {
isOpen?: boolean; // whether the modal is open or not
Expand Down

0 comments on commit 29881ac

Please sign in to comment.