fix: Modal-Titel in HelpTooltip übersetzt
- Modal-Titel verwendet jetzt Übersetzung (Hilfe/Help) - Browser-Tooltip entfernt (nur noch custom Tooltip) - useTranslations in HelpTooltip-Komponente integriert
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { useState, useRef, useEffect } from 'react';
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
interface HelpTooltipProps {
|
||||
shortText: string; // Text für Hover
|
||||
@@ -9,6 +10,7 @@ interface HelpTooltipProps {
|
||||
}
|
||||
|
||||
export default function HelpTooltip({ shortText, longText, position = 'top' }: HelpTooltipProps) {
|
||||
const t = useTranslations('CuratorHelp');
|
||||
const [showHover, setShowHover] = useState(false);
|
||||
const [showModal, setShowModal] = useState(false);
|
||||
const tooltipRef = useRef<HTMLDivElement>(null);
|
||||
@@ -143,7 +145,7 @@ export default function HelpTooltip({ shortText, longText, position = 'top' }: H
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'start', marginBottom: '1rem' }}>
|
||||
<h3 style={{ margin: 0, fontSize: '1.25rem', fontWeight: 'bold' }}>Hilfe</h3>
|
||||
<h3 style={{ margin: 0, fontSize: '1.25rem', fontWeight: 'bold' }}>{t('modalTitle')}</h3>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setShowModal(false)}
|
||||
|
||||
Reference in New Issue
Block a user