mirror of
https://github.com/Since-3/Kuma.git
synced 2026-10-12 20:51:18 +00:00
Merge pull request #124 from Since-3/bug/nextjs-bug-mobile-not-functioning
fix mobile view in dev
This commit is contained in:
commit
bcb2a9a779
3 changed files with 24 additions and 4 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
allowedDevOrigins: ["192.168.2.111"],
|
||||
images: {
|
||||
remotePatterns: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@
|
|||
|
||||
@layer base {
|
||||
* {
|
||||
@apply border-border outline-ring/50;
|
||||
@apply border-border;
|
||||
}
|
||||
body {
|
||||
@apply bg-background text-foreground;
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue