Skip to content

Conversation

@CarolinaCobo
Copy link
Contributor

✨ Codu Pull Request 💻

Fixes #(issue)

Pull Request details

  • Add sponsors page
  • Add ninedots

Any Breaking changes

  • IF ANYTHING YOU'RE COMMITTING WOULD BREAK SOMETHING, INCLUDE HERE WHAT WOULD BREAK
  • IF YOU HAVE NO BREAKING CHANGES, ENTER 'None'

Associated Screenshots

  • IF YOU HAVE ANY SCREENSHOTS, INCLUDE THEM HERE. ( Welcome file extensions include gifs/png screenshots of your feature in action )
  • IF YOU HAVE NO SCREENSHOTS, ENTER 'None'

[Optional] What gif best describes this PR or how it makes you feel

  • HERES HOW TO EASILY ADD GIFS TO A PR
  • IF NO GIF COMES TO MIND, ENTER 'None'

@CarolinaCobo CarolinaCobo requested a review from a team as a code owner February 28, 2025 22:07
@vercel
Copy link

vercel bot commented Feb 28, 2025

@CarolinaCobo is attempting to deploy a commit to the Codú Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 28, 2025

Walkthrough

The changes introduce a new configuration constant and two new page components. A constant named companies is added to hold company details. A React component is created to render a company page based on a slug parameter, performing a lookup in the companies configuration and handling not-found cases. Additionally, the sponsorship page has been updated to replace a static image with a clickable image link that navigates to the corresponding company page.

Changes

File(s) Change Summary
app/(app)/company/[slug]/config.ts
app/(app)/company/[slug]/page.tsx
- Added a new constant companies containing company details in config.ts.
- Created a new React component in page.tsx that uses the slug parameter to retrieve and render company data, with metadata and a not-found check.
app/(app)/sponsorship/page.tsx - Imported Link from next/link.
- Replaced a static image with a clickable image link wrapping a new image (ninedots.png) that directs users to /company/ninedots.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant CP as Company Page Component
    participant CC as Companies Config
    
    U->>CP: Request page with slug parameter
    CP->>CC: Lookup company using slug
    alt Company exists
        CC-->>CP: Return company details
        CP-->>U: Render company information
    else Company not found
        CP-->>U: Invoke notFound (404 response)
    end
Loading
sequenceDiagram
    participant U as User
    participant SP as Sponsorship Page
    participant R as Router
    
    U->>SP: Click on company image link
    SP->>R: Navigate to /company/ninedots
    R-->>U: Render corresponding company page
Loading

Poem

I'm a hopping rabbit, codes prance and play,
Digging in configs to brighten the day.
Companies and pages now dance in the light,
Links lead to wonders, oh what a sight!
My little paws tap a joyful code tune,
Celebrating changes beneath the coding moon.
🐰 Hop on to the magic of improvements anew!

✨ Finishing Touches
  • 📝 Generate Docstrings

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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration 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
Contributor

@NiallJoeMaher NiallJoeMaher left a comment

Choose a reason for hiding this comment

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

🚀

@vercel
Copy link

vercel bot commented Feb 28, 2025

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

Name Status Preview Comments Updated (UTC)
codu ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 28, 2025 10:12pm

Copy link
Contributor

@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: 1

🧹 Nitpick comments (4)
app/(app)/sponsorship/page.tsx (1)

65-71: Update the alt text for consistency

The alt text for the ninedots image is "StaticKit", which doesn't match the actual company being displayed. This should be updated to "Ninedots" for consistency and proper accessibility.

                  <img
                    className="my-auto h-16"
                    src="/images/sponsors/ninedots.png"
-                   alt="StaticKit"
+                   alt="Ninedots"
                  />
app/(app)/company/[slug]/config.ts (2)

5-6: Improve readability of long text strings

The bio and note fields contain very long text strings that reduce code readability. Consider using template literals with line breaks for better maintainability.

-    bio: "Trusted talent partner based in Dublin and Bahrain. We specialise in everything within the tech ecosystem, including marketing and tech sales. However, if we can't assist, we won't tell you we can. What we CAN do is steer you in the right direction - we believe it doesn't cost to be helpful!",
-    note: "We're incredibly grateful to Ninedots for supporting our tech community since April! Your generosity has helped us grow, bring people together, and create amazing learning opportunities through events, workshops, and networking sessions. Your support means the world to us, and we couldn't do this without you.Thanks for believing in our mission and being a part of our journey—we're excited for what's ahead!",
+    bio: `Trusted talent partner based in Dublin and Bahrain. We specialise in everything 
+      within the tech ecosystem, including marketing and tech sales. However, if we can't assist, 
+      we won't tell you we can. What we CAN do is steer you in the right direction - 
+      we believe it doesn't cost to be helpful!`,
+    note: `We're incredibly grateful to Ninedots for supporting our tech community since April! 
+      Your generosity has helped us grow, bring people together, and create amazing learning opportunities 
+      through events, workshops, and networking sessions. Your support means the world to us, and 
+      we couldn't do this without you. Thanks for believing in our mission and being a part of 
+      our journey—we're excited for what's ahead!`,

6-6: Fix missing space in text

There's a missing space between "you." and "Thanks" in the note text.

-    note: "We're incredibly grateful to Ninedots for supporting our tech community since April! Your generosity has helped us grow, bring people together, and create amazing learning opportunities through events, workshops, and networking sessions. Your support means the world to us, and we couldn't do this without you.Thanks for believing in our mission and being a part of our journey—we're excited for what's ahead!",
+    note: "We're incredibly grateful to Ninedots for supporting our tech community since April! Your generosity has helped us grow, bring people together, and create amazing learning opportunities through events, workshops, and networking sessions. Your support means the world to us, and we couldn't do this without you. Thanks for believing in our mission and being a part of our journey—we're excited for what's ahead!",
app/(app)/company/[slug]/page.tsx (1)

66-71: Use Next.js Link component for navigation

For internal navigation, use the Next.js Link component instead of a regular anchor tag for better performance through client-side navigation.

-          <a
-            href="/sponsorship"
-            className="text-sm font-medium text-neutral-500 hover:text-neutral-700 dark:text-neutral-400 dark:hover:text-neutral-300"
-          >
-            ← Back to all sponsors
-          </a>
+          <Link
+            href="/sponsorship"
+            className="text-sm font-medium text-neutral-500 hover:text-neutral-700 dark:text-neutral-400 dark:hover:text-neutral-300"
+          >
+            ← Back to all sponsors
+          </Link>

Don't forget to add the import at the top:

+import Link from "next/link";
 import { notFound } from "next/navigation";
 import { companies } from "./config";
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e332aa9 and aad66f5.

⛔ Files ignored due to path filters (1)
  • public/images/sponsors/ninedots.png is excluded by !**/*.png, !**/*.png
📒 Files selected for processing (3)
  • app/(app)/company/[slug]/config.ts (1 hunks)
  • app/(app)/company/[slug]/page.tsx (1 hunks)
  • app/(app)/sponsorship/page.tsx (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: e2e

Comment on lines +4 to +8
export const metadata = {
title: "Ninedots Recruitment | Codu",
description:
"Explore our community sponsors. Ninedots Recruitment connects top talent with leading companies in the tech industry.",
};
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Make metadata dynamic based on company slug

The metadata is currently hardcoded for Ninedots, but this is a dynamic page that could support multiple companies. Consider making the metadata dynamic based on the company found by the slug.

-export const metadata = {
-  title: "Ninedots Recruitment | Codu",
-  description:
-    "Explore our community sponsors. Ninedots Recruitment connects top talent with leading companies in the tech industry.",
-};

+export async function generateMetadata({ params }: Props) {
+  const { slug } = params;
+  const company = companies.find((item) => item.slug === slug.toLowerCase());
+  
+  if (!company) return {};
+  
+  return {
+    title: `${company.name} | Codu`,
+    description: `Explore our community sponsors. ${company.name} ${company.bio.substring(0, 100)}...`,
+  };
+}
📝 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. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export const metadata = {
title: "Ninedots Recruitment | Codu",
description:
"Explore our community sponsors. Ninedots Recruitment connects top talent with leading companies in the tech industry.",
};
export async function generateMetadata({ params }: Props) {
const { slug } = params;
const company = companies.find((item) => item.slug === slug.toLowerCase());
if (!company) return {};
return {
title: `${company.name} | Codu`,
description: `Explore our community sponsors. ${company.name} ${company.bio.substring(0, 100)}...`,
};
}

@NiallJoeMaher NiallJoeMaher merged commit 43f9845 into codu-code:develop Feb 28, 2025
7 of 8 checks passed
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.

2 participants