-
{t('builder_page.results.performance.title')}
-
- {t('builder_page.results.performance.rating')}:
- {recommendation.performanceRating}/10
-
+ {recommendation.marketLocation.address && (
+
+
{t("builder_page.results.purchase_location.address")}
+
{recommendation.marketLocation.address}
+ )}
-
- {recommendation.estimatedPerformance.gaming && (
-
-
- {recommendation.estimatedPerformance.gaming}
-
-
{t('builder_page.results.performance.gaming')}
-
- )}
- {recommendation.estimatedPerformance.contentCreation && (
-
-
- {recommendation.estimatedPerformance.contentCreation}
-
-
{t('builder_page.results.performance.content_creation')}
-
- )}
- {recommendation.estimatedPerformance.productivity && (
-
-
- {recommendation.estimatedPerformance.productivity}
-
-
{t('builder_page.results.performance.productivity')}
-
- )}
+ {recommendation.marketLocation.popularFor && (
+
+
{t("builder_page.results.purchase_location.specialization")}
+
{recommendation.marketLocation.popularFor}
+ )}
-
-
{t('builder_page.results.total_cost')}:
-
- {getCurrencySymbol(currency as CurrencyCode)}
- {recommendation?.components?.reduce((sum, item) => sum + item.price, 0)}
-
+ {recommendation.marketLocation.contact && (
+
+
{t("builder_page.results.purchase_location.contact")}
+
{recommendation.marketLocation.contact}
+ )}
-
-
-
{t('builder_page.results.components.title')}
- {recommendation.components.map((item, index) => (
-
-
-
- {componentIcons[item.type.toLowerCase()] || '⚙️'}
-
-
-
{item.name}
-
{item.type}
- {item.performanceNote && (
-
{item.performanceNote}
- )}
-
-
-
- {getCurrencySymbol(currency as CurrencyCode)}
- {item.price.toLocaleString()}
-
-
- ))}
-
-
- {recommendation.notes && recommendation.notes.length > 0 && (
-
-
{t('builder_page.results.notes.title')}
-
- {recommendation.notes.map((note, index) => (
- -
- •
- {note}
-
- ))}
-
-
- )}
-
- {recommendation?.marketLocation && (
-
-
-
-
-
{t('builder_page.results.purchase_location.title')}
-
-
-
-
-
{t('builder_page.results.purchase_location.name')}
-
{recommendation.marketLocation.name}
-
-
- {recommendation.marketLocation.address && (
-
-
{t('builder_page.results.purchase_location.address')}
-
{recommendation.marketLocation.address}
-
- )}
-
- {recommendation.marketLocation.popularFor && (
-
-
{t('builder_page.results.purchase_location.specialization')}
-
{recommendation.marketLocation.popularFor}
-
- )}
-
- {recommendation.marketLocation.contact && (
-
-
{t('builder_page.results.purchase_location.contact')}
-
{recommendation.marketLocation.contact}
-
- )}
-
-
-
-
-
-
-
-
- )}
-
- >
- )
+
+
+
+
+
+
+
+ )}
+
+ >
+ );
}
-export default BuilderResult
\ No newline at end of file
+export default BuilderResult;
diff --git a/components/error-display.tsx b/components/error-display.tsx
index c7c20ba..251f370 100644
--- a/components/error-display.tsx
+++ b/components/error-display.tsx
@@ -1,111 +1,115 @@
-"use client"
+"use client";
-import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"
-import { Button } from "@/components/ui/button"
-import { CircleAlert, X } from "lucide-react"
-import { motion, AnimatePresence } from "framer-motion"
-import { ReactNode, useEffect } from "react"
-import { cn } from "@/lib/utils"
+import type { ReactNode } from "react";
+
+import { AnimatePresence, motion } from "framer-motion";
+import { CircleAlert, X } from "lucide-react";
+import { useEffect } from "react";
+
+import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
+import { Button } from "@/components/ui/button";
+import { cn } from "@/lib/utils";
type ErrorDisplayProps = {
- title: string
- message: string | ReactNode
- type?: "default" | "destructive" | "success" | "warning"
- onDismiss?: () => void
- className?: string
- showIcon?: boolean
- autoDismiss?: boolean
- dismissTime?: number
-}
+ title: string;
+ message: string | ReactNode;
+ type?: "default" | "destructive" | "success" | "warning";
+ onDismiss?: () => void;
+ className?: string;
+ showIcon?: boolean;
+ autoDismiss?: boolean;
+ dismissTime?: number;
+};
const variants = {
- initial: { opacity: 0, y: -20 },
- animate: { opacity: 1, y: 0 },
- exit: { opacity: 0, y: 20 }
-}
+ initial: { opacity: 0, y: -20 },
+ animate: { opacity: 1, y: 0 },
+ exit: { opacity: 0, y: 20 },
+};
const alertVariants = {
- default: "border-border bg-background",
- destructive: "border-destructive/50 bg-destructive/10 text-destructive",
- success: "border-emerald-500/50 bg-emerald-500/10 text-emerald-600",
- warning: "border-amber-500/50 bg-amber-500/10 text-amber-600"
-}
+ default: "border-border bg-background",
+ destructive: "border-destructive/50 bg-destructive/10 text-destructive",
+ success: "border-emerald-500/50 bg-emerald-500/10 text-emerald-600",
+ warning: "border-amber-500/50 bg-amber-500/10 text-amber-600",
+};
export function ErrorDisplay({
- title,
- message,
- type = "default",
- onDismiss,
- className = "",
- showIcon = true,
- autoDismiss = false,
- dismissTime = 5000
+ title,
+ message,
+ type = "default",
+ onDismiss,
+ className = "",
+ showIcon = true,
+ autoDismiss = false,
+ dismissTime = 5000,
}: ErrorDisplayProps) {
+ useEffect(() => {
+ if (autoDismiss && onDismiss) {
+ const timer = setTimeout(() => {
+ onDismiss();
+ }, dismissTime);
+ return () => clearTimeout(timer);
+ }
+ }, [autoDismiss, dismissTime, onDismiss]);
- useEffect(() => {
- if (autoDismiss && onDismiss) {
- const timer = setTimeout(() => {
- onDismiss()
- }, dismissTime)
- return () => clearTimeout(timer)
- }
- }, [autoDismiss, dismissTime, onDismiss])
-
- return (
-
-
+
+
+ {onDismiss && (
+
+
+ );
+}
diff --git a/components/featured.tsx b/components/featured.tsx
index 675fa6e..76fd080 100644
--- a/components/featured.tsx
+++ b/components/featured.tsx
@@ -1,68 +1,65 @@
-"use client"
-import { motion } from 'framer-motion';
-import { Card } from '@/components/ui/card';
-import { useTranslation } from '@/context/i18n-store';
+"use client";
+import { motion } from "framer-motion";
-export default function FeaturesSection() {
-
- const { t } = useTranslation()
+import { Card } from "@/components/ui/card";
+import { useTranslation } from "@/context/i18n-store";
+export default function FeaturesSection() {
+ const { t } = useTranslation();
const features = [
{
- title: t('features.items.budget'),
- description: t('features.descriptions.budget'),
+ title: t("features.items.budget"),
+ description: t("features.descriptions.budget"),
icon: "💰",
- color: "text-green-500"
+ color: "text-green-500",
},
{
- title: t('features.items.pricing'),
- description: t('features.descriptions.pricing'),
+ title: t("features.items.pricing"),
+ description: t("features.descriptions.pricing"),
icon: "🌐",
- color: "text-blue-500"
+ color: "text-blue-500",
},
{
- title: t('features.items.usage'),
- description: t('features.descriptions.usage'),
+ title: t("features.items.usage"),
+ description: t("features.descriptions.usage"),
icon: "🎯",
- color: "text-purple-500"
+ color: "text-purple-500",
},
{
- title: t('features.items.future'),
- description: t('features.descriptions.future'),
+ title: t("features.items.future"),
+ description: t("features.descriptions.future"),
icon: "🔮",
- color: "text-amber-500"
+ color: "text-amber-500",
},
{
- title: t('features.items.compatibility'),
- description: t('features.descriptions.compatibility'),
+ title: t("features.items.compatibility"),
+ description: t("features.descriptions.compatibility"),
icon: "✅",
- color: "text-emerald-500"
+ color: "text-emerald-500",
},
{
- title: t('features.items.benchmark'),
- description: t('features.descriptions.benchmark'),
+ title: t("features.items.benchmark"),
+ description: t("features.descriptions.benchmark"),
icon: "📊",
- color: "text-red-500"
+ color: "text-red-500",
},
];
-
-
return (
-
{t('features.title')}
+
{t("features.title")}
- {t('features.description')}
+ {t("features.description")}
{features.map((feature, index) => (
);
-}
\ No newline at end of file
+}
diff --git a/components/header.tsx b/components/header.tsx
index 2f6722b..0e79eb0 100644
--- a/components/header.tsx
+++ b/components/header.tsx
@@ -1,86 +1,86 @@
-"use client"
+"use client";
-import Link from 'next/link'
-import { useTheme } from 'next-themes'
-import { Button } from '@/components/ui/button'
-import { Sun, Moon, Monitor, Languages } from 'lucide-react'
-import { useTranslation } from '@/context/i18n-store'
-import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuTrigger,
-} from '@/components/ui/dropdown-menu'
+import { Languages, Monitor, Moon, Sun } from "lucide-react";
+import { useTheme } from "next-themes";
+import Link from "next/link";
+import { Button } from "@/components/ui/button";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+import { useTranslation } from "@/context/i18n-store";
-const Header = () => {
- const { setTheme } = useTheme()
- const { t, language, setLanguage } = useTranslation()
+function Header() {
+ const { setTheme } = useTheme();
+ const { t, language, setLanguage } = useTranslation();
- return (
-
-