fix: updated contact information in imprint & /contact page

This commit is contained in:
Melvin Ragusa
2026-01-24 10:47:40 +01:00
parent 516f29f312
commit 77fd62447c
3 changed files with 77 additions and 60 deletions

View File

@@ -1,10 +1,7 @@
import { type ReactNode, useEffect } from 'react';
import { createPortal } from 'react-dom';
import { motion, AnimatePresence } from 'motion/react';
import styles from './Modal.module.css';
// I need to check if lucide-react is installed.
// Based on package list, react-icons is installed.
import { type ReactNode, useEffect } from "react";
import { createPortal } from "react-dom";
import { motion, AnimatePresence } from "motion/react";
import styles from "./Modal.module.css";
interface ModalProps {
isOpen: boolean;
@@ -17,22 +14,22 @@ export function Modal({ isOpen, onClose, title, children }: ModalProps) {
// Prevent body scroll when modal is open
useEffect(() => {
if (isOpen) {
document.body.style.overflow = 'hidden';
document.body.style.overflow = "hidden";
} else {
document.body.style.overflow = 'unset';
document.body.style.overflow = "unset";
}
return () => {
document.body.style.overflow = 'unset';
document.body.style.overflow = "unset";
};
}, [isOpen]);
// Close on escape key
useEffect(() => {
const handleEscape = (e: KeyboardEvent) => {
if (e.key === 'Escape') onClose();
if (e.key === "Escape") onClose();
};
window.addEventListener('keydown', handleEscape);
return () => window.removeEventListener('keydown', handleEscape);
window.addEventListener("keydown", handleEscape);
return () => window.removeEventListener("keydown", handleEscape);
}, [onClose]);
return createPortal(
@@ -88,6 +85,6 @@ export function Modal({ isOpen, onClose, title, children }: ModalProps) {
</motion.div>
)}
</AnimatePresence>,
document.body
document.body,
);
}