mirror of
https://github.com/SamyRai/turash.git
synced 2025-12-26 23:01:33 +00:00
Some checks failed
CI/CD Pipeline / backend-build (push) Has been skipped
CI/CD Pipeline / backend-lint (push) Failing after 31s
CI/CD Pipeline / frontend-lint (push) Failing after 1m26s
CI/CD Pipeline / frontend-build (push) Has been skipped
CI/CD Pipeline / e2e-test (push) Has been skipped
- Fix prettier formatting issues in multiple components - Fix React Compiler memoization issues in ProductServiceMarkers.tsx - Replace literal strings with i18n keys across components - Address i18n issues in heritage, network graph, and match components - Fix dependency arrays in useMemo hooks to match React Compiler expectations
39 lines
1.4 KiB
TypeScript
39 lines
1.4 KiB
TypeScript
import React from 'react';
|
|
import { HistoricalLandmark, Page } from '@/types.ts';
|
|
import { Card, CardContent } from '@/components/ui/Card.tsx';
|
|
import { History } from 'lucide-react';
|
|
import Button from '@/components/ui/Button.tsx';
|
|
|
|
interface HistoricalContextCardProps {
|
|
landmark: HistoricalLandmark;
|
|
onNavigate: (page: Page) => void;
|
|
}
|
|
|
|
const HistoricalContextCard = ({ landmark, onNavigate }: HistoricalContextCardProps) => {
|
|
return (
|
|
<Card className="bg-warning/10 border-warning/20">
|
|
<CardContent className="p-6 text-center">
|
|
<div className="h-12 w-12 mx-auto rounded-full flex items-center justify-center bg-warning/20 text-warning-foreground mb-3">
|
|
<History className="h-4 h-6 text-current w-4 w-6" />
|
|
</div>
|
|
<h3 className="text-base font-semibold text-warning-foreground">
|
|
{t('heritage.historicalContext')}
|
|
</h3>
|
|
<p className="text-sm text-warning-foreground/80 mt-1">
|
|
{t('heritage.buildingDescription', { name: landmark.name, period: landmark.period })}
|
|
</p>
|
|
<Button
|
|
variant="ghost"
|
|
size="sm"
|
|
className="mt-3 text-warning-foreground hover:text-warning-foreground hover:bg-warning/20"
|
|
onClick={() => onNavigate('map')}
|
|
>
|
|
{t('heritage.viewOnMap')}
|
|
</Button>
|
|
</CardContent>
|
|
</Card>
|
|
);
|
|
};
|
|
|
|
export default React.memo(HistoricalContextCard);
|