Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: removed the duplication of animation #222

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/components/organisms/TemplateCard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import getTemplate from "../../../util/template/getTemplate";
import Template from "../../../util/template/Template";
import mainLayouts from "../../../util/layouts";
import mainAnimations from "../../../util/animation";
import mainAnimations from "../../../../../util/animation/animation";
import mainThemes from "../../../util/themes";
import mainFonts from "../../../util/fonts";
import { serverUrl } from "../../Constants/urlConfig";
Expand Down
22 changes: 0 additions & 22 deletions frontend/src/util/animation/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/api/controllers/quotesController.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const themes = require("../../themes/themes");
const animations = require("../../animations/animation");
const animations = require("../../../util/animation/animation");
const layouts=require("../../layouts/layout");
const quoteService=require("../services/quotesService");
const fonts=require("../../fonts/fonts");
Comment on lines 1 to 5
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [36-44]

The error handling block logs the error and sends a response with the error name and message. It's good practice to also consider the HTTP status code for errors. For client-related errors (e.g., invalid request parameters), sending a 400 Bad Request status code, and for server errors, a 500 Internal Server Error might be more appropriate.

  res.status(error.statusCode || 500).send({
    name: error.name,
    message: error.message,
  });

Expand Down
3 changes: 2 additions & 1 deletion src/animations/animation.js → util/animation/animation.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const animations = {

default:{
animation:"",
keyframes:""
Expand All @@ -19,4 +20,4 @@ const animations = {
},
};

module.exports=animations;
module.exports = animations;