Skip to content

Commit

Permalink
Merge pull request #69 from chingu-voyages/refactor-and-delete-unused…
Browse files Browse the repository at this point in the history
…-files

refactor(app-wide): delete unused files and rename and restructure to…
  • Loading branch information
timDeHof authored Nov 2, 2023
2 parents 7e09b3e + 54170af commit 9407250
Show file tree
Hide file tree
Showing 52 changed files with 53 additions and 20,122 deletions.
14 changes: 2 additions & 12 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
import Spa from "./routes";
import makeServer from "./mirageServer/server";
import { Routes, Route } from "react-router-dom";
import {
Home,
Posts,
PostDetail,
About,
Search,
RecipeDetailsPage,
Components,
} from "@/pages";
import { Home, About, Search, RecipeDetails, Components } from "@/pages";
// Please keep on when possible to avoid using up our Tasty API free quota
// All api calls will be intercepted and fulfilled by the mirage server.
const USE_MIRAGE_API = true;
Expand All @@ -24,11 +16,9 @@ function App() {
<Route element={<Spa />}>
<Route path="/" element={<Home />} />
<Route path="/about" element={<About />} />
<Route path="/posts" element={<Posts />} />
<Route path="/posts/:postId" element={<PostDetail />} />
<Route path="/search" element={<Search />} />
<Route path="/recipes">
<Route path=":recipeId" element={<RecipeDetailsPage />} />
<Route path=":recipeId" element={<RecipeDetails />} />
</Route>
<Route path="/components" element={<Components />} />
</Route>
Expand Down
Binary file removed src/assets/HomePage/BellPeppers.png
Binary file not shown.
5 changes: 0 additions & 5 deletions src/assets/Menu.svg

This file was deleted.

6 changes: 0 additions & 6 deletions src/assets/Search.svg

This file was deleted.

File renamed without changes
File renamed without changes
File renamed without changes
5 changes: 5 additions & 0 deletions src/assets/brand/food/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import chickenWings from "./ChickenWings.png";
import chocoPBChips from "./ChocolateChipPB.png";
import spicyChickenPizza from "./SpicyChickenPizza.png";

export { chickenWings, chocoPBChips, spicyChickenPizza };
5 changes: 5 additions & 0 deletions src/assets/brand/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import BellPeppers from "./bell-peppers/BellPeppers";
import YumiWithSpatula from "./yumi-with-spatula/YumiWithSpatula";
import YumiWithSpoon from "./yumi-with-spoon/YumiWithSpoon";

export { BellPeppers, YumiWithSpatula, YumiWithSpoon };
4 changes: 4 additions & 0 deletions src/assets/brand/logo/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import colorLogo from "./yumyumyes-logo-m.png";
import creamLogo from "./yumyumyes-logo-lightcream.svg";

export { colorLogo, creamLogo };
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
3 changes: 0 additions & 3 deletions src/assets/close.svg

This file was deleted.

5 changes: 0 additions & 5 deletions src/assets/down-arrow.svg

This file was deleted.

File renamed without changes
3 changes: 3 additions & 0 deletions src/assets/icons/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import Stir from "./Stir";
import Thermometer from "./Thermometer";
import UpArrow from "./UpArrow";
import YellowDot from "./YellowDot";
import github from "./github.png";

export const icons = {
Close,
Expand All @@ -39,3 +40,5 @@ export const icons = {
UpArrow,
YellowDot,
};

export { github };
21 changes: 4 additions & 17 deletions src/assets/index.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
import colorLogo from "./brand/yumyumyes-logo-m.png";
import creamLogo from "./brand/yumyumyes-logo-lightcream.svg";
import BellPeppers from "./brand/bell-peppers/BellPeppers";
import SpicyChickenPizza from "./HomePage/SpicyChickenPizza.png";
import ChickenWings from "./HomePage/ChickenWingsfood.png";
import ChocoPBChip from "./HomePage/ChocolateChipPB.png";
import FeatureRecipe from "./RecipePhoto.png";
import github from "./github.png";

export {
github,
colorLogo,
creamLogo,
SpicyChickenPizza,
ChickenWings,
ChocoPBChip,
BellPeppers,
FeatureRecipe,
};
export { FeatureRecipe };

export * from "./brand";
export * from "./brand/food";
export * from "./brand/logo";
export * from "./icons";
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import YumiWithSpoon from "@/assets/brand/yumi-with-spoon/YumiWithSpoon.jsx";
import SvgComponent from "@/assets/HomePage/svgWave";
import SvgComponent from "@/assets/brand/swooshes/svgWave";
import { welcome } from "@/constants";
import { Heading, Button, Icon } from "@/features/ui";
import { Link } from "react-router-dom";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import SvgComponent from "@/assets/HomePage/svgWave";
import SvgComponent from "@/assets/brand/swooshes/svgWave";
import { Icon } from "@/features/ui";

import BellPeppers from "@/assets/brand/bell-peppers/BellPeppers.jsx";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// import { BananaLabel, ChickenLabel, FruitLabel } from "@/assets";
import { ChocoPBChip, SpicyChickenPizza, ChickenWings } from "@/assets";
import {
chickenWings,
chocoPBChips,
spicyChickenPizza,
YumiWithSpatula,
} from "@/assets";

import { Heading, RecipeLinkCard } from "@/features/ui";

import YumiWithspatula from "@/assets/brand/yumi-with-spatula/YumiWithSpatula";
import { Heading } from "@/features/ui";
import { RecipeLinkCard } from "@/features/recipes";

export const TopRecipes = () => {
return (
Expand All @@ -15,27 +18,27 @@ export const TopRecipes = () => {
<div className="recipe-link-cards-wrapper flex flex-wrap justify-around xl:content-end gap-x-2 gap-y-6 w-[300px] md:w-[50%] lg:w-[63%] xl:w-[75%]">
<RecipeLinkCard
text="Choco PB Chip Banana Muffins"
src={ChocoPBChip}
src={chocoPBChips}
variant="banana"
link="/recipes/5813"
/>

<RecipeLinkCard
text="Spicy Chicken Pizza"
src={SpicyChickenPizza}
src={spicyChickenPizza}
variant="watermelon"
link="/recipes/5149"
/>

<RecipeLinkCard
text="Chicken Wings"
src={ChickenWings}
src={chickenWings}
variant="tangerine"
link="/recipes/5232"
/>
</div>

<YumiWithspatula
<YumiWithSpatula
resolution="272"
className="w-[272px] self-center xl:-mt-24 xl:max-w-[22%]"
alt="Yumi holding a spatula surrounded by fruits"
Expand Down
7 changes: 3 additions & 4 deletions src/features/HomePage/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from "./components/Hero-section";
export * from "./components/Search-section";
export * from "./components/Top-recipes";
export * from "../HomePage/components/Hero-section";
export * from "./components/hero-section";
export * from "./components/search-section";
export * from "./components/top-recipes";
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ RecipeLinkCard.propTypes = {
bgColor: PropTypes.string,
text: PropTypes.string,
variant: PropTypes.string,
bgGradient: PropTypes,
bgGradient: PropTypes.string,
};
File renamed without changes.
1 change: 1 addition & 0 deletions src/features/recipes/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from "./api";
export * from "./components/recipe-list";
export * from "./components/feature-of-the-day";
export * from "./components/recipe-link-card";
1 change: 0 additions & 1 deletion src/features/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ export * from "./Button";
export * from "./Picture";
export * from "./LoadingState";
export * from "../HomePage";
export * from "./RecipeLinkCard";
Loading

0 comments on commit 9407250

Please sign in to comment.