few changes

This commit is contained in:
Andreas Knuth 2025-08-18 14:50:38 -05:00
parent 447af46fa0
commit 5fbd696ad0
4 changed files with 36 additions and 62 deletions

View File

@ -1,8 +1,12 @@
/** @type {import('next').NextConfig} */ // next.config.js
const nextConfig = { const path = require('path');
experimental: { const withFlowbiteReact = require('flowbite-react/plugin/nextjs');
// hier können andere gültige experimentelle Optionen stehen, falls nötig
},
};
module.exports = nextConfig; const nextConfig = {
output: 'export',
images: { unoptimized: true },
webpack: (config) => {
config.resolve.alias['@'] = path.resolve(process.cwd());
return config;
},
};

View File

@ -3,6 +3,8 @@ import path from "path";
import withFlowbiteReact from "flowbite-react/plugin/nextjs"; import withFlowbiteReact from "flowbite-react/plugin/nextjs";
const nextConfig = { const nextConfig = {
output: "export",
images: { unoptimized: true },
webpack: (config) => { webpack: (config) => {
config.resolve.alias["@"] = path.resolve(process.cwd()); config.resolve.alias["@"] = path.resolve(process.cwd());
return config; return config;

View File

@ -1,23 +1,23 @@
// pages/api/track.js // pages/api/track.js
import { PostHogClient } from "@/lib/posthog"; import { PostHogClient } from "@/lib/posthog";
export default async function handler(req, res) { export default async function handler(req, res) {
const posthog = PostHogClient(); const posthog = PostHogClient();
try { try {
const { event, properties, distinctId } = req.body; const { event, properties, distinctId } = req.body;
await posthog.capture({ await posthog.capture({
distinctId: distinctId || "server_event", distinctId: distinctId || "server_event",
event: event || "default_event", event: event || "default_event",
properties: properties || {}, properties: properties || {},
}); });
await posthog.shutdown(); await posthog.shutdown();
return res.status(200).json({ success: true }); return res.status(200).json({ success: true });
} catch (error) { } catch (error) {
console.error("PostHog error:", error); console.error("PostHog error:", error);
return res.status(500).json({ success: false, error: error.message }); return res.status(500).json({ success: false, error: error.message });
} }
} }

View File

@ -1,32 +0,0 @@
// pages/demo.jsx
import React from "react";
import FontCard from "@/components/ui/FontCard"; // DefaultImport
import { fonts } from "@/lib/fonts";
export default function Demo() {
// Absicherung gegen undefined beim SSR
const robotoClass = fonts.roboto?.className || "";
return (
<section className="space-y-8 p-8">
{/* 1. next/font (voll integriert) */}
<h2 className={`${robotoClass} text-4xl`}>
Roboto aus next/font
</h2>
{/* 2. TailwindUtility aus Map */}
<p className="font-montserrat text-xl">
Dieselbe Font via <code>font-montserrat</code>
</p>
{/* 3. Deine PreviewKomponente */}
<FontCard
fontName="Pacifico"
transformedText="Hallo Instagram!"
category="handwriting"
isPopular
index={0}
/>
</section>
);
}