Skip to content

Fierillo - #4

Open
Fierillo wants to merge 7 commits into
lacrypta:mainfrom
Fierillo:fierillo
Open

Fierillo#4
Fierillo wants to merge 7 commits into
lacrypta:mainfrom
Fierillo:fierillo

Conversation

@Fierillo

@Fierillo Fierillo commented May 13, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Introduced a modular countdown timer that displays time remaining until ticket sales, with support for dynamic event dates and custom titles.
  • Enhancements
    • Updated event page header, tagline, and descriptions for improved clarity and emphasis.
    • Added new font styles and glowing text effects for a more distinctive visual appearance.
    • Refined ticket section to show a countdown when tickets are unavailable.
  • Style
    • Changed icons and descriptions in the event section for better thematic alignment.
    • Expanded font and color options in the design system.
  • Bug Fixes
    • Removed a canceled event item from the event schedule.

@vercel

vercel Bot commented May 13, 2025

Copy link
Copy Markdown

@Fierillo is attempting to deploy a commit to the La Crypta Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented May 13, 2025

Copy link
Copy Markdown

Walkthrough

The updates refactor the countdown timer into a reusable, prop-driven component with improved logic and Spanish labels, update the PAS section's icons and descriptions, add pixel and segment fonts via global CSS and Tailwind config, and enhance the event page’s layout and ticketing logic to integrate the new countdown timer. Additionally, a schedule item was removed from the event timeline.

Changes

File(s) Change Summary
app/components/countdown-timer.tsx Refactored countdown timer into a modular, prop-based component; extracted time logic; added Spanish labels; removed animations; introduced TimeUnit subcomponent.
app/components/pas-section.tsx Updated PAS section icons and descriptions; changed import to include new icons; no logic changes.
app/globals.css Added imports for "Press Start 2P" and "DSEG7" fonts at the top of the file.
app/page.tsx Imported new countdown timer and global CSS; updated event text, location, and YouTube section; reworked ticketing logic to use countdown timer when tickets are unavailable; minor formatting adjustments.
tailwind.config.ts Added "pixel" and "segment" font families, new box and text shadow styles, and a brand red color; reformatted plugins array.
app/components/event-schedule.tsx Removed one schedule item ("Tarjeta La Crypta" at 21:35) from the event timeline data.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant BitcoinPizzaDayPage
    participant CountdownTimer

    User->>BitcoinPizzaDayPage: Loads event page
    BitcoinPizzaDayPage->>CountdownTimer: Passes eventDate and title as props
    CountdownTimer->>CountdownTimer: Calculates time left
    CountdownTimer-->>BitcoinPizzaDayPage: Renders countdown or end message
    BitcoinPizzaDayPage-->>User: Displays countdown or ticket section
Loading

Poem

🥕
A timer ticks, the seconds fly,
With pixel fonts and colors spry.
The PAS now shines with trophies bold,
As pizza tales and tickets unfold.
Fonts imported, styles anew—
The code hops forward, fresh and true!
🕒🍕

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 30th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 2a921fc and 7230a2f.

📒 Files selected for processing (1)
  • app/components/event-schedule.tsx (0 hunks)
💤 Files with no reviewable changes (1)
  • app/components/event-schedule.tsx
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (3)
app/components/pas-section.tsx (1)

4-4: Remove unused Turtle import.

The Turtle icon is imported but not used anywhere in the component.

-import { AlertTriangle, TrendingUp, Trophy, Turtle, Zap } from 'lucide-react';
+import { TrendingUp, Trophy, Zap } from 'lucide-react';
app/components/countdown-timer.tsx (2)

16-19: Fix indentation inconsistency

The TimeUnitProps interface has inconsistent indentation compared to other code blocks (extra spaces).

-interface TimeUnitProps {
-    value: number;
-    label: string;
-  }
+interface TimeUnitProps {
+  value: number;
+  label: string;
+}

55-55: Consider internationalizing the end message

Since you're using Spanish labels for time units, the end message is also in Spanish. If this component needs to be reused in different language contexts, consider making this message configurable through props.

-  if (!timeLeft) return <div className="text-brand-red text-center text-lg font-blatant">¡Tiempo de espera terminado!</div>;
+  const endMessage = props.endMessage || "¡Tiempo de espera terminado!";
+  if (!timeLeft) return <div className="text-brand-red text-center text-lg font-blatant">{endMessage}</div>;

Don't forget to update the CountdownTimerProps interface:

interface CountdownTimerProps {
  eventDate: Date;
  countdownTitle?: string;
  endMessage?: string;
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 92fe700 and 2a921fc.

📒 Files selected for processing (5)
  • app/components/countdown-timer.tsx (2 hunks)
  • app/components/pas-section.tsx (1 hunks)
  • app/globals.css (1 hunks)
  • app/page.tsx (8 hunks)
  • tailwind.config.ts (3 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
app/globals.css

[error] 5-5: This @import is in the wrong position.

Any @import rules must precede all other valid at-rules and style rules in a stylesheet (ignoring @charset and @layer), or else the @import rule is invalid.
Consider moving import position.

(lint/correctness/noInvalidPositionAtImportRule)


[error] 6-6: This @import is in the wrong position.

Any @import rules must precede all other valid at-rules and style rules in a stylesheet (ignoring @charset and @layer), or else the @import rule is invalid.
Consider moving import position.

(lint/correctness/noInvalidPositionAtImportRule)

🔇 Additional comments (18)
tailwind.config.ts (3)

22-31: LGTM! Great work on the font and shadow configurations.

The pixel and segment font families along with the box shadow and text shadow additions are well-structured and will enhance the UI, especially for the countdown timer component.


73-73: LGTM! Good addition of the brand red color.

This new color value (#FF5238) properly extends the brand color palette and is used effectively for highlighting the "Entradas limitadas" text in the page.


114-116: LGTM! Clean code formatting.

The multi-line formatting of plugins improves readability while maintaining the same functionality.

app/components/pas-section.tsx (3)

10-11: LGTM! Good improvement to the Problem section.

Changing from an AlertTriangle to a Trophy icon better aligns with the positive messaging in the updated description.


16-16: LGTM! Improved messaging for the Agitation section.

The updated description effectively emphasizes the community aspect and the ideological layer of Bitcoin.


21-21: LGTM! Good update to the Solution section.

The new description effectively communicates the value proposition of being able to spend satoshis at the event.

app/page.tsx (5)

20-20: LGTM! Good implementation of the countdown timer with event date.

The CountdownTimer component import and EVENT_DATE constant work well together to provide a dynamic countdown experience.

Also applies to: 25-25


74-76: LGTM! Enhanced typography with larger font sizes.

The updated font sizes for headline text improve readability and visual hierarchy.


122-124: LGTM! Improved event details presentation.

The additional location details and highlighted "Entradas limitadas" text with the new brand-red color effectively communicate crucial information to users.


170-171: LGTM! Good terminology update.

Changing "entusiastas" to "guerreros bitcoiners" adds character and reinforces the community aspect.


197-243: LGTM! Well-implemented conditional rendering.

The ternary operator for toggling between ticket display and countdown timer is clean and functional. The CountdownTimer component is effectively used with props for eventDate and countdownTitle.

app/components/countdown-timer.tsx (7)

4-7: Good implementation of props interface

Creating a typed interface for component props improves type safety and documents the component's API clearly. The optional countdownTitle provides good flexibility.


22-33: Well-structured helper function

Extracting the time calculation logic into a pure helper function is a good practice. The function correctly handles the case when the event has already passed by returning null.


35-35: Good formatting utility

This utility function ensures consistent display format for time units. Consider moving this and other helper functions to a separate utilities file if they grow in number or complexity.


46-53: Well-implemented effect and state management

Good implementation of useState and useEffect hooks. The interval is properly cleared on component unmount, and the dependency array correctly includes only the eventDate prop.


58-65: Good responsive design implementation

The component includes responsive design considerations with different styling for various screen sizes. The use of Spanish time unit labels aligns with the application's intended audience.


68-70: Consistent export style

Using a default export for the component follows common React conventions and makes importing straightforward.


37-44:

Details

✅ Verification successful

Well-implemented TimeUnit component

The TimeUnit component effectively encapsulates the rendering logic for each time unit, promoting code reuse and consistency in the UI.

However, verify that the custom font classes (font-segment, font-blatant) and color classes (text-brand-green) are properly defined in your global CSS or Tailwind configuration.


🏁 Script executed:

#!/bin/bash
# Check if the custom classes are defined in Tailwind config
grep -r "font-segment\|font-blatant\|brand-green\|brand-red" --include="*.ts" --include="*.js" --include="*.css" .

Length of output: 152


🏁 Script executed:

#!/usr/bin/env bash
# Locate any Tailwind config files in the repo
CONFIG_FILES=$(fd tailwind.config -t f)
if [ -z "$CONFIG_FILES" ]; then
  echo "No Tailwind config files found."
  exit 0
fi

echo "Found Tailwind config file(s):"
echo "$CONFIG_FILES"
echo

# Search for custom fontFamily and color definitions
echo "Checking fontFamily entries:"
grep -R -n "fontFamily" $CONFIG_FILES || true
echo
echo "Checking explicit 'segment' and 'blatant' keys:"
grep -R -n "segment" $CONFIG_FILES || true
grep -R -n "blatant" $CONFIG_FILES || true
echo
echo "Checking color entries:"
grep -R -n "colors" $CONFIG_FILES || true
echo
echo "Checking explicit 'brand-green' and 'brand-red' keys:"
grep -R -n "brand-green" $CONFIG_FILES || true
grep -R -n "brand-red" $CONFIG_FILES || true

Length of output: 1002


🏁 Script executed:

#!/usr/bin/env bash
# Display the Tailwind CSS color definitions to verify 'brand' colors
echo "---- Tailwind Config Colors Block (lines 30-100) ----"
sed -n '30,100p' tailwind.config.ts

Length of output: 2370


Well-implemented TimeUnit component

The TimeUnit component cleanly encapsulates rendering for each time unit, promoting reuse and UI consistency.

All custom classes are defined and available:

  • font-segment is declared in tailwind.config.ts
  • text-brand-green is declared under colors.brand.green in tailwind.config.ts
  • font-blatant is declared in app/globals.css

No further action required.

Comment thread app/globals.css
Comment on lines +5 to +6
@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");
@import url("https://fonts.cdnfonts.com/css/dseg"); /* Fuente DSEG7 */

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

Reposition the @import rules to follow CSS best practices.

According to CSS specifications, @import rules should precede all other style rules in a stylesheet (except @charset). Currently, these imports come after @tailwind directives.

Apply this diff to fix the position of the font imports:

@tailwind base;
@tailwind components;
@tailwind utilities;

-@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");
-@import url("https://fonts.cdnfonts.com/css/dseg"); /* Fuente DSEG7 */
+@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");
+@import url("https://fonts.cdnfonts.com/css/dseg"); /* Fuente DSEG7 */

@font-face {
  font-family: "STANDERD";
+@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");
+@import url("https://fonts.cdnfonts.com/css/dseg"); /* Fuente DSEG7 */
+
@tailwind base;
@tailwind components;
@tailwind utilities;

-@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");
-@import url("https://fonts.cdnfonts.com/css/dseg"); /* Fuente DSEG7 */
📝 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
@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");
@import url("https://fonts.cdnfonts.com/css/dseg"); /* Fuente DSEG7 */
/* Move font imports to the very top, before any other at-rules */
@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");
@import url("https://fonts.cdnfonts.com/css/dseg"); /* Fuente DSEG7 */
@tailwind base;
@tailwind components;
@tailwind utilities;
@font-face {
font-family: "STANDERD";
/* … */
}
🧰 Tools
🪛 Biome (1.9.4)

[error] 5-5: This @import is in the wrong position.

Any @import rules must precede all other valid at-rules and style rules in a stylesheet (ignoring @charset and @layer), or else the @import rule is invalid.
Consider moving import position.

(lint/correctness/noInvalidPositionAtImportRule)


[error] 6-6: This @import is in the wrong position.

Any @import rules must precede all other valid at-rules and style rules in a stylesheet (ignoring @charset and @layer), or else the @import rule is invalid.
Consider moving import position.

(lint/correctness/noInvalidPositionAtImportRule)

🤖 Prompt for AI Agents
In app/globals.css around lines 5 to 6, the @import rules for fonts are placed
after @tailwind directives, which violates CSS best practices. Move all @import
statements to the very top of the stylesheet, before any other rules including
@tailwind directives, to comply with CSS specifications.

Comment thread app/page.tsx
import Link from 'next/link';
import { motion } from 'framer-motion';
import useSWR from 'swr';
import "./globals.css"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

Avoid importing globals.css in component files.

In Next.js, globals.css should typically only be imported in _app.js, _document.js, or layout.js (for App Router). Importing it in a page component might cause duplicate styles or unexpected behavior.

Remove this import as it likely already exists in the appropriate root file:

-import "./globals.css"
📝 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
import "./globals.css"
🤖 Prompt for AI Agents
In app/page.tsx at line 7, remove the import statement for globals.css because
global styles should only be imported once in the root files like _app.js,
_document.js, or layout.js in Next.js. This prevents duplicate styles and
unexpected behavior.

Comment thread app/page.tsx
const ENABLE_TICKETS = process.env.NEXT_PUBLIC_ENABLE_TICKETS === 'true';
const TICKET_GENERAL_PRICE = Number(process.env.NEXT_PUBLIC_GENERAL_PRICE || 0);
const TICKET_PREMIUM_PRICE = 40;
const EVENT_DATE = new Date('2025-05-13T20:00:00')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify date consistency in the codebase.

There's a potential inconsistency between the EVENT_DATE (May 13, 2025) and the displayed date in the UI (May 23). Ensure all event dates are consistent throughout the application.


🏁 Script executed:

#!/bin/bash
# Search for references to dates in May 2025 to verify consistency
rg -i "may.*2025" --type=tsx --type=jsx --type=ts --type=js

Length of output: 89


🏁 Script executed:

#!/bin/bash
# Search for date references in May 2025 across TSX, TS, JS, and JSX files
rg -i "may.*2025" -g "*.tsx" -g "*.ts" -g "*.js" -g "*.jsx"

# Search for ISO date literals in May 2025
rg "2025-05" -g "*.tsx" -g "*.ts" -g "*.js" -g "*.jsx"

Length of output: 308


Ensure consistent event dates across pages

The EVENT_DATE in app/page.tsx (May 13, 2025) doesn’t match the metadata in app/layout.tsx (May 23, 2025). Please align both to the same date/time.

• app/page.tsx (line 25)
• app/layout.tsx ('event:date' & 'event:end_date')

Example update if the event is May 23:

- const EVENT_DATE = new Date('2025-05-13T20:00:00')
+ const EVENT_DATE = new Date('2025-05-23T19:00:00-03:00')
📝 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
const EVENT_DATE = new Date('2025-05-13T20:00:00')
// app/page.tsx
- const EVENT_DATE = new Date('2025-05-13T20:00:00')
+ const EVENT_DATE = new Date('2025-05-23T19:00:00-03:00')
🤖 Prompt for AI Agents
In app/page.tsx at line 25, the EVENT_DATE is set to May 13, 2025, which
conflicts with the event date metadata in app/layout.tsx set to May 23, 2025. To
fix this, update the EVENT_DATE in app/page.tsx to match the date used in
app/layout.tsx, ensuring both files use the same event date and time
consistently across the application.

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.

1 participant