зеркало из
https://github.com/kodackx/disinformation-quest.git
synced 2025-10-28 20:34:15 +02:00
Fix type errors in constants.tsx
Resolved TypeScript errors related to invalid animation types in `src/components/game/constants.tsx`. Updated the animation type definitions to ensure compatibility with the existing types. [skip gpt_engineer]
Этот коммит содержится в:
родитель
93bf8bf364
Коммит
52155388c4
@ -15,6 +15,15 @@ interface StrategyAnimationProps {
|
||||
export const StrategyAnimation: React.FC<StrategyAnimationProps> = ({ animation, className = '' }) => {
|
||||
const { type } = animation;
|
||||
|
||||
// Helper function to render default animation with custom text
|
||||
const renderDefaultAnimation = (text: string) => (
|
||||
<div className={`relative w-full h-40 overflow-hidden bg-black/20 rounded-lg ${className}`}>
|
||||
<div className="absolute inset-0 flex items-center justify-center text-yellow-500">
|
||||
{text}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
switch (type) {
|
||||
case 'network':
|
||||
return <NetworkAnimation className={className} />;
|
||||
@ -28,13 +37,29 @@ export const StrategyAnimation: React.FC<StrategyAnimationProps> = ({ animation,
|
||||
return <ExpertAnimation className={className} />;
|
||||
case 'podcast':
|
||||
return <PodcastAnimation className={className} />;
|
||||
case 'influencer':
|
||||
return renderDefaultAnimation('Influencer Strategy');
|
||||
case 'silence':
|
||||
return renderDefaultAnimation('Strategic Silence');
|
||||
case 'counter':
|
||||
return renderDefaultAnimation('Counter Campaign');
|
||||
case 'academic':
|
||||
return renderDefaultAnimation('Academic Strategy');
|
||||
case 'whitepaper':
|
||||
return renderDefaultAnimation('Whitepaper Publication');
|
||||
case 'celebrity':
|
||||
return renderDefaultAnimation('Celebrity Influence');
|
||||
case 'bias':
|
||||
return renderDefaultAnimation('Media Bias Strategy');
|
||||
case 'research':
|
||||
return renderDefaultAnimation('Research Strategy');
|
||||
case 'event':
|
||||
return renderDefaultAnimation('Event Strategy');
|
||||
case 'platform':
|
||||
return renderDefaultAnimation('Platform Strategy');
|
||||
case 'freedom':
|
||||
return renderDefaultAnimation('Freedom Strategy');
|
||||
default:
|
||||
return (
|
||||
<div className={`relative w-full h-40 overflow-hidden bg-black/20 rounded-lg ${className}`}>
|
||||
<div className="absolute inset-0 flex items-center justify-center text-yellow-500">
|
||||
Strategy Visualization
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
return renderDefaultAnimation('Strategy Visualization');
|
||||
}
|
||||
};
|
||||
@ -9,7 +9,9 @@ export interface ExpertAudio {
|
||||
}
|
||||
|
||||
export interface StrategyAnimation {
|
||||
type: "network" | "meme" | "news" | "community" | "expert" | "research" | "podcast" | "event" | "platform" | "freedom";
|
||||
type: "network" | "meme" | "news" | "community" | "expert" | "research" |
|
||||
"podcast" | "event" | "platform" | "freedom" | "influencer" | "silence" |
|
||||
"counter" | "academic" | "whitepaper" | "celebrity" | "bias";
|
||||
config?: {
|
||||
particleCount?: number;
|
||||
speed?: number;
|
||||
@ -50,5 +52,4 @@ export interface DossierEntry {
|
||||
title: string;
|
||||
insights: string[];
|
||||
strategicNote: string;
|
||||
}
|
||||
|
||||
}
|
||||
Загрузка…
x
Ссылка в новой задаче
Block a user