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

coursepages #645

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

Vanshika-73
Copy link

@Vanshika-73 Vanshika-73 commented May 20, 2024

#630
Different pages are added for different courses. I have changed few pictures wherever I found. I added an MBBS course, whereas I combined B.tech and BE.
As this task was related to frontend, I haven't added notes, links and different subject names for different courses.
image
image
image
image
image

Copy link

vercel bot commented May 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
project-amupedia ❌ Failed (Inspect) May 25, 2024 2:15pm

Copy link

Thank you, @Vanshika-73, for creating this pull request and contributing to GitHub-ReadMe! 💗

Our review team will thoroughly review the pull request and will reach out to you soon! 😇
Please make sure you have marked all the completed tasks as done. ✅
We appreciate your patience and contribution! 😀

Copy link

coderabbitai bot commented May 20, 2024

Walkthrough

Walkthrough

The recent updates bring significant enhancements to avatar generation, course links, and UI styling across various components and pages. These changes include adding avatar color and initial generation functions, updating course links for better navigation, commenting out unnecessary image properties, and incorporating new styling dependencies. Moreover, new components for different engineering branches and MBBS courses have been introduced, enriching the display and interaction experience with the curriculum.

Changes

File Path Change Summary
components/Curriculum/SubjCard.js Added functions for avatar color and initial generation.
components/common/Navbar.js Updated course links from "B.Tech" to "B.Tech/B.E" and "BE" to "MBBS".
data/semData.js Commented out unnecessary img property in the subjects array.
package.json Added new dependencies for styling: @emotion/react, @emotion/styled, and @mui/material.
pages/courses/btech/index.js Updated course links using <Link> components for various BTech branches.
pages/courses/mbbs/index.js Introduced a new component for displaying MBBS program details.
pages/index.js Updated course links from B.Tech to B.Tech/B.E and BE to MBBS.
styles/Btech.module.css Adjusted max-width and added a background image rule for #food.
styles/Home.module.css Changed background images for classes grab1 and grab2.
styles/scss/sems.module.scss Modified max-width for improved styling.
pages/courses/btech/.../index.js Added components and exports for various BTech branches (e.g., Chemical, Civil, ECE, Electrical, etc.).
pages/courses/btech/.../[subject].js Enhanced functionality with static paths, properties, and new components for various BTech branches.

Poem

In the code where colors blend and links do mend,
New branches sprout, and avatars shout.
With pixels bright and courses right,
Engineers and doctors take flight.
🎨📚✨

Tip

New Features and Improvements

Review Settings

Introduced new personality profiles for code reviews. Users can now select between "Chill" and "Assertive" review tones to tailor feedback styles according to their preferences. The "Assertive" profile posts more comments and nitpicks the code more aggressively, while the "Chill" profile is more relaxed and posts fewer comments.

AST-based Instructions

CodeRabbit offers customizing reviews based on the Abstract Syntax Tree (AST) pattern matching. Read more about AST-based instructions in the documentation.

Community-driven AST-based Rules

We are kicking off a community-driven initiative to create and share AST-based rules. Users can now contribute their AST-based rules to detect security vulnerabilities, code smells, and anti-patterns. Please see the ast-grep-essentials repository for more information.

New Static Analysis Tools

We are continually expanding our support for static analysis tools. We have added support for biome, hadolint, and ast-grep. Update the settings in your .coderabbit.yaml file or head over to the settings page to enable or disable the tools you want to use.

Tone Settings

Users can now customize CodeRabbit to review code in the style of their favorite characters or personalities. Here are some of our favorite examples:

  • Mr. T: "You must talk like Mr. T in all your code reviews. I pity the fool who doesn't!"
  • Pirate: "Arr, matey! Ye must talk like a pirate in all yer code reviews. Yarrr!"
  • Snarky: "You must be snarky in all your code reviews. Snark, snark, snark!"

Revamped Settings Page

We have redesigned the settings page for a more intuitive layout, enabling users to find and adjust settings quickly. This change was long overdue; it not only improves the user experience but also allows our development team to add more settings in the future with ease. Going forward, the changes to .coderabbit.yaml will be reflected in the settings page, and vice versa.

Miscellaneous

  • Turn off free summarization: You can switch off free summarization of PRs opened by users not on a paid plan using the enable_free_tier setting.
  • Knowledge-base scope: You can now set the scope of the knowledge base to either the repository (local) or the organization (global) level using the knowledge_base setting. In addition, you can specify Jira project keys and Linear team keys to limit the knowledge base scope for those integrations.
  • High-level summary placement: You can now customize the location of the high-level summary in the PR description using the high_level_summary_placeholder setting (default @coderabbitai summary).
  • Revamped request changes workflow: You can now configure CodeRabbit to auto-approve or request changes on PRs based on the review feedback using the request_changes_workflow setting.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 9

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between c5f45df and 81b3f61.
Files ignored due to path filters (2)
  • public/images/btech/food.jpg is excluded by !**/*.jpg
  • public/images/home/mbbs.jpeg is excluded by !**/*.jpeg
Files selected for processing (25)
  • components/Curriculum/SubjCard.js (1 hunks)
  • components/common/Navbar.js (1 hunks)
  • data/semData.js (1 hunks)
  • package.json (1 hunks)
  • pages/courses/btech/ChemicalEngineering/index.js (1 hunks)
  • pages/courses/btech/CivilEngineering/[subject].js (1 hunks)
  • pages/courses/btech/CivilEngineering/index.js (1 hunks)
  • pages/courses/btech/ComputerEngineering/[subject].js (1 hunks)
  • pages/courses/btech/ComputerEngineering/index.js (1 hunks)
  • pages/courses/btech/EceEngineering/[subject].js (1 hunks)
  • pages/courses/btech/EceEngineering/index.js (1 hunks)
  • pages/courses/btech/ElectricalEngineering/[subject].js (1 hunks)
  • pages/courses/btech/ElectricalEngineering/index.js (1 hunks)
  • pages/courses/btech/ElectronicsEngineering/[subject].js (1 hunks)
  • pages/courses/btech/ElectronicsEngineering/index.js (1 hunks)
  • pages/courses/btech/FoodEngineering/[subject].js (1 hunks)
  • pages/courses/btech/FoodEngineering/index.js (1 hunks)
  • pages/courses/btech/MechanicalEngineering/[subject].js (1 hunks)
  • pages/courses/btech/MechanicalEngineering/index.js (1 hunks)
  • pages/courses/btech/index.js (6 hunks)
  • pages/courses/mbbs/index.js (1 hunks)
  • pages/index.js (1 hunks)
  • styles/Btech.module.css (2 hunks)
  • styles/Home.module.css (1 hunks)
  • styles/scss/sems.module.scss (1 hunks)
Files not reviewed due to errors (7)
  • pages/courses/btech/CivilEngineering/[subject].js (no review received)
  • pages/courses/btech/ComputerEngineering/[subject].js (no review received)
  • pages/courses/btech/EceEngineering/[subject].js (no review received)
  • pages/courses/btech/ElectricalEngineering/[subject].js (no review received)
  • pages/courses/btech/ElectronicsEngineering/[subject].js (no review received)
  • pages/courses/btech/FoodEngineering/[subject].js (no review received)
  • pages/courses/btech/MechanicalEngineering/[subject].js (no review received)
Files skipped from review due to trivial changes (6)
  • components/common/Navbar.js
  • data/semData.js
  • pages/courses/mbbs/index.js
  • styles/Btech.module.css
  • styles/Home.module.css
  • styles/scss/sems.module.scss
Additional comments not posted (8)
components/Curriculum/SubjCard.js (2)

8-26: The implementation of stringToColor function looks good and follows best practices for handling bitwise operations with eslint.


28-35: The stringAvatar function is well-implemented, making good use of the stringToColor function for dynamic avatar styling.

pages/courses/btech/ComputerEngineering/index.js (1)

6-50: Component setup and structure appear correct for ComputerEngineering.

The component is appropriately named and structured for the ComputerEngineering directory. Good use of modular imports and clear JSX structure.

package.json (1)

17-17: Verify the usage of @mui/material in the project to ensure it's necessary.

Verification successful

The verification confirms that @mui/material is used in the project, specifically in the components/Curriculum/SubjCard.js file.

  • components/Curriculum/SubjCard.js: import Avatar from '@mui/material/Avatar';
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the usage of `@mui/material` in the project.

# Test: Search for the library usage. Expect: At least one occurrence.
rg --type javascript '@mui/material'

Length of output: 71



Script:

#!/bin/bash
# Description: Verify the usage of `@mui/material` in the project.

# Test: Search for the library usage. Expect: At least one occurrence.
rg --type js '@mui/material'
rg --type jsx '@mui/material'
rg --type ts '@mui/material'
rg --type tsx '@mui/material'

Length of output: 399



Script:

#!/bin/bash
# Description: Verify the usage of `@mui/material` in the project.

# Test: Search for the library usage. Expect: At least one occurrence.
rg '@mui/material' --glob '*.js'
rg '@mui/material' --glob '*.jsx'
rg '@mui/material' --glob '*.ts'
rg '@mui/material' --glob '*.tsx'

Length of output: 657



Script:

#!/bin/bash
# Description: Verify the usage of `@mui/material` in the project.

# Find all relevant files and search for the library usage.
fd -e js -e jsx -e ts -e tsx -x rg '@mui/material' {}

Length of output: 98

pages/courses/btech/index.js (2)

26-33: Verify the necessity of commenting out these links. If they are no longer needed, consider removing them to clean up the code.

Also applies to: 34-42


Line range hint 44-135: Verify the correctness and functionality of the newly added course links to ensure they lead to the intended pages.

pages/index.js (2)

183-183: The update from "B.Tech" to "B.Tech/B.E" in the link text is a good clarification.


187-190: The addition of the "M.B.B.S" link is a valuable expansion of the course offerings.

package.json Outdated
@@ -8,10 +8,13 @@
"lint": "next lint"
},
"dependencies": {
"@emotion/react": "^11.11.4",
Copy link

Choose a reason for hiding this comment

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

Tip

Codebase Verification

The search for @emotion/react only found its entry in package.json and no actual usage in the codebase. This suggests that the dependency might be unnecessary.

  • Please verify if @emotion/react is indeed required or if it can be removed to avoid unnecessary bloat.
Analysis chain

Verify the usage of @emotion/react in the project to ensure it's necessary.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the usage of `@emotion/react` in the project.

# Test: Search for the library usage. Expect: At least one occurrence.
rg --type javascript '@emotion/react'

Length of output: 72



Script:

#!/bin/bash
# Description: Verify the usage of `@emotion/react` in the project.

# Test: Search for the library usage. Expect: At least one occurrence.
rg --type js '@emotion/react'

Length of output: 29



Script:

#!/bin/bash
# Description: Verify the usage of `@emotion/react` in the project.

# Test: Search for the library usage in .js, .jsx, and .tsx files. Expect: At least one occurrence.
rg --type-add 'jsx:*.{jsx,tsx}' '@emotion/react'

Length of output: 95

package.json Outdated
@@ -8,10 +8,13 @@
"lint": "next lint"
},
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
Copy link

@coderabbitai coderabbitai bot May 20, 2024

Choose a reason for hiding this comment

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

Tip

Codebase Verification

The dependency @emotion/styled is not used in the codebase and may be unnecessary.

  • package.json: Line 12
Analysis chain

Verify the usage of @emotion/styled in the project to ensure it's necessary.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the usage of `@emotion/styled` in the project.

# Test: Search for the library usage. Expect: At least one occurrence.
rg --type javascript '@emotion/styled'

Length of output: 73



Script:

#!/bin/bash
# Description: Verify the usage of `@emotion/styled` in the project.

# Test: Search for the library usage. Expect: At least one occurrence.
rg --type js '@emotion/styled'

Length of output: 30



Script:

#!/bin/bash
# Description: Verify the usage of `@emotion/styled` in the project.

# Test: Search for the library usage in JavaScript and TypeScript files. Expect: At least one occurrence.
rg --type-add 'js:*.{js,jsx,ts,tsx}' '@emotion/styled'

Length of output: 102

Copy link
Member

Choose a reason for hiding this comment

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

why you added these two packages.. are they really required?

Copy link

Choose a reason for hiding this comment

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

@anmode, the analysis indicates that both @emotion/react and @emotion/styled are listed in the package.json but are not actively used in any JavaScript or TypeScript files within the project. This suggests that these packages might have been added unnecessarily.

It's a good practice to keep the project dependencies minimal to reduce the bundle size and potential maintenance overhead. You might want to verify if these packages are planned to be used in future developments. If not, consider removing them to keep the project clean and efficient. If you need further assistance or have plans for these packages, please let me know!

Analysis chain
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the usage of `@emotion/react` in the project.

# Test: Search for the library usage in JavaScript and TypeScript files. Expect: At least one occurrence.
rg --type-add 'js:*.{js,jsx,ts,tsx}' '@emotion/react'

Length of output: 100

Comment on lines 6 to 50
const ComputerEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Ece Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};

export default ComputerEngineering;
Copy link

Choose a reason for hiding this comment

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

Ensure the component name matches the file context.

The component is named ComputerEngineering but it is used in the EceEngineering directory. This could lead to confusion and errors in maintenance. Consider renaming the component to EceEngineering to match the file context.

- const ComputerEngineering = () => {
+ const EceEngineering = () => {

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
const ComputerEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Ece Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};
export default ComputerEngineering;
const EceEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Ece Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};
export default ComputerEngineering;

Comment on lines 6 to 50
const ComputerEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Food Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};

export default ComputerEngineering;
Copy link

Choose a reason for hiding this comment

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

Ensure the component name matches the file context.

The component is named ComputerEngineering but it is used in the FoodEngineering directory. This could lead to confusion and errors in maintenance. Consider renaming the component to FoodEngineering to match the file context.

- const ComputerEngineering = () => {
+ const FoodEngineering = () => {

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
const ComputerEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Food Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};
export default ComputerEngineering;
const FoodEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Food Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};
export default ComputerEngineering;

Comment on lines 6 to 50
const ComputerEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Civil Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};

export default ComputerEngineering;
Copy link

Choose a reason for hiding this comment

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

Ensure the component name matches the file context.

The component is named ComputerEngineering but it is used in the CivilEngineering directory. This could lead to confusion and errors in maintenance. Consider renaming the component to CivilEngineering to match the file context.

- const ComputerEngineering = () => {
+ const CivilEngineering = () => {

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
const ComputerEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Civil Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};
export default ComputerEngineering;
const CivilEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Civil Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};
export default ComputerEngineering;

Comment on lines 6 to 50
const ComputerEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Chemical Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};

export default ComputerEngineering;
Copy link

Choose a reason for hiding this comment

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

Ensure the component name matches the file context.

The component is named ComputerEngineering but it is used in the ChemicalEngineering directory. This could lead to confusion and errors in maintenance. Consider renaming the component to ChemicalEngineering to match the file context.

- const ComputerEngineering = () => {
+ const ChemicalEngineering = () => {

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
const ComputerEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Chemical Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};
export default ComputerEngineering;
const ChemicalEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Chemical Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};
export default ComputerEngineering;

Comment on lines 6 to 50
const ComputerEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Electrical Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};

export default ComputerEngineering;
Copy link

Choose a reason for hiding this comment

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

Ensure the component name matches the file context.

The component is named ComputerEngineering but it is used in the ElectricalEngineering directory. This could lead to confusion and errors in maintenance. Consider renaming the component to ElectricalEngineering to match the file context.

- const ComputerEngineering = () => {
+ const ElectricalEngineering = () => {

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
const ComputerEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Electrical Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};
export default ComputerEngineering;
const ElectricalEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Electrical Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};
export default ComputerEngineering;

Comment on lines 6 to 50
const ComputerEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Mechanical Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};

export default ComputerEngineering;
Copy link

Choose a reason for hiding this comment

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

Ensure the component name matches the file context.

The component is named ComputerEngineering but it is used in the MechanicalEngineering directory. This could lead to confusion and errors in maintenance. Consider renaming the component to MechanicalEngineering to match the file context.

- const ComputerEngineering = () => {
+ const MechanicalEngineering = () => {

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
const ComputerEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Mechanical Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};
export default ComputerEngineering;
const MechanicalEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Mechanical Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};
export default ComputerEngineering;

Comment on lines 6 to 50
const ComputerEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Electronics Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};

export default ComputerEngineering;
Copy link

Choose a reason for hiding this comment

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

Ensure the component name matches the file context.

The component is named ComputerEngineering but it is used in the ElectronicsEngineering directory. This could lead to confusion and errors in maintenance. Consider renaming the component to ElectronicsEngineering to match the file context.

- const ComputerEngineering = () => {
+ const ElectronicsEngineering = () => {

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
const ComputerEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Electronics Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};
export default ComputerEngineering;
const ElectronicsEngineering = () => {
return (
<div>
<Header image="/images/blog/blog_bg.svg" text="Electronics Engineering" />
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>First Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* second yr */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Second Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* third Year*/}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Third Year</h2>
/</div>
<Sems data={firstYearSems} />
{/* fourth */}
<div
data-aos='fade-up'
className={styles.ourserv}
id={styles.ourserv}
>
<h2>Fourth Year</h2>
/</div>
<Sems data={firstYearSems} />
<Footer />
</div>
);
};
export default ComputerEngineering;

@anmode
Copy link
Member

anmode commented May 23, 2024

Please look at code rabbit ai once. I'll provide my reviews at today night asap

Copy link
Member

@anmode anmode left a comment

Choose a reason for hiding this comment

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

There is lot of code duplicacy.. please see if we can reduce it.

Comment on lines 4 to 11
// import InitialsAvatar from /'react-initials-avatar';
// import 'react-initials-avatar/lib/ReactInitialsAvatar.css';


function stringToColor(string) {
let hash = 0;
let i;

Copy link
Member

@anmode anmode May 24, 2024

Choose a reason for hiding this comment

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

remove this un import

Copy link
Author

Choose a reason for hiding this comment

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

okay

export const firstYearSems = [
{
name: null,
subjects: [
{
name: "Applied Mathematics 1",
slug: "applied-mathematics-1",
img: null,
// img:( ),
Copy link
Member

Choose a reason for hiding this comment

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

why?

Copy link
Author

Choose a reason for hiding this comment

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

because I have used Initials Avatar for the subjects.

package.json Outdated
@@ -8,10 +8,13 @@
"lint": "next lint"
},
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
Copy link
Member

Choose a reason for hiding this comment

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

why you added these two packages.. are they really required?

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 81b3f61 and 8e353fc.
Files selected for processing (11)
  • components/Curriculum/SubjCard.js (1 hunks)
  • package.json (1 hunks)
  • pages/courses/bcom/index.js (1 hunks)
  • pages/courses/bsc/index.js (1 hunks)
  • pages/courses/btech/ChemicalEngineering/index.js (1 hunks)
  • pages/courses/btech/CivilEngineering/index.js (1 hunks)
  • pages/courses/btech/EceEngineering/index.js (1 hunks)
  • pages/courses/btech/ElectricalEngineering/index.js (1 hunks)
  • pages/courses/btech/ElectronicsEngineering/index.js (1 hunks)
  • pages/courses/btech/FoodEngineering/index.js (1 hunks)
  • pages/courses/btech/MechanicalEngineering/index.js (1 hunks)
Files skipped from review due to trivial changes (2)
  • pages/courses/bcom/index.js
  • pages/courses/bsc/index.js
Files skipped from review as they are similar to previous changes (9)
  • components/Curriculum/SubjCard.js
  • package.json
  • pages/courses/btech/ChemicalEngineering/index.js
  • pages/courses/btech/CivilEngineering/index.js
  • pages/courses/btech/EceEngineering/index.js
  • pages/courses/btech/ElectricalEngineering/index.js
  • pages/courses/btech/ElectronicsEngineering/index.js
  • pages/courses/btech/FoodEngineering/index.js
  • pages/courses/btech/MechanicalEngineering/index.js

@Vanshika-73
Copy link
Author

Vanshika-73 commented May 25, 2024

@anmode I have pushed the required changes in the branch I made.
The thing about code repetition is that it is there because I haven't changed the subject names yet.
On changing thode, repetition would be decreased.

@Vanshika-73 Vanshika-73 reopened this May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants