Merge pull request #124 from Since-3/bug/nextjs-bug-mobile-not-functioning

fix mobile view in dev
This commit is contained in:
Rajpreet0 2026-06-22 23:15:19 +02:00 • committed by GitHub
commit bcb2a9a779
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 24 additions and 4 deletions

View file

@ -1,6 +1,7 @@
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
allowedDevOrigins: ["192.168.2.111"],
images: {
remotePatterns: [
{

View file

@ -117,7 +117,7 @@
@layer base {
* {
@apply border-border outline-ring/50;
@apply border-border;
}
body {
@apply bg-background text-foreground;

View file

@ -71,12 +71,31 @@ const CourseListItem: React.FC<CourseListItemProps> = ({
const currentLevel = levelConfig[level] || levelConfig.any;
// Funktion zum Kopieren des Buchungslinks
const handleCopyLink = () => {
const handleCopyLink = async () => {
if (!courseId) return;
const bookingUrl = `${window.location.origin}/courses/book/${courseId}`;
navigator.clipboard.writeText(bookingUrl);
toast.success("Link wurde in die Zwischenablage kopiert");
try {
if (navigator.clipboard?.writeText) {
await navigator.clipboard.writeText(bookingUrl);
} else {
const el = document.createElement("textarea");
el.value = bookingUrl;
el.style.position = "fixed";
el.style.opacity = "0";
document.body.appendChild(el);
try {
el.select();
const ok = document.execCommand("copy");
if (!ok) throw new Error("execCommand copy failed");
} finally {
document.body.removeChild(el);
}
}
toast.success("Link wurde in die Zwischenablage kopiert");
} catch {
toast.error("Link konnte nicht kopiert werden");
}
};
const getInitials = (name: string) => {