refactor: centralize gold tokens, extract sub-components, clean up unused code
- Replace hardcoded hex colors with gold/gold-light/gold-dark Tailwind tokens - Extract Schedule into DayCard, ScheduleFilters, MobileSchedule sub-components - Extract Team into TeamCarousel, TeamMemberInfo sub-components - Add UI_CONFIG for centralized magic numbers (timings, thresholds) - Add reusable IconBadge component, simplify Contact section - Convert Pricing clickable divs to semantic buttons for a11y - Remove unused SocialLinks, btn-outline, btn-ghost, nav-link CSS classes - Fix React setState-during-render error in TeamCarousel (deferred update pattern) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
21
src/lib/config.ts
Normal file
21
src/lib/config.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
export const UI_CONFIG = {
|
||||
scrollThresholds: {
|
||||
header: 20,
|
||||
backToTop: 600,
|
||||
},
|
||||
team: {
|
||||
autoPlayMs: 4500,
|
||||
pauseMs: 12000,
|
||||
cardSpacing: 260,
|
||||
stageHeight: 440,
|
||||
floatingHeartsCount: 12,
|
||||
},
|
||||
faq: {
|
||||
visibleCount: 4,
|
||||
},
|
||||
showcase: {
|
||||
autoPlayInterval: 5000,
|
||||
fadeMs: 250,
|
||||
swipeThreshold: 50,
|
||||
},
|
||||
} as const;
|
||||
@@ -16,6 +16,3 @@ export const NAV_LINKS: NavLink[] = [
|
||||
{ label: "FAQ", href: "#faq" },
|
||||
{ label: "Контакты", href: "#contact" },
|
||||
];
|
||||
|
||||
export const API_BASE_URL =
|
||||
process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:8000/api/v1";
|
||||
|
||||
Reference in New Issue
Block a user