From 64c421613aa01645c7d6d96dc5217f468ad5f898 Mon Sep 17 00:00:00 2001 From: Kunthawat Greethong Date: Tue, 10 Mar 2026 08:38:13 +0700 Subject: [PATCH] feat: Add cookie consent banner + cookie policy page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using website-creator skill approach with minimal changes: ✅ Added CookieConsent component (client-side, localStorage) ✅ Added CookieConsent to layout.tsx ✅ Created /cookie-policy page (Thai, PDPA-compliant) ✅ Links to Privacy Policy and Terms & Conditions Minimal changes: - No CSS changes (uses existing Tailwind classes) - No layout changes (component added to existing layout) - Only necessary files added/modified Build: ✅ Success - /cookie-policy page added --- src/app/cookie-policy/page.tsx | 40 +++++++++++++++++++++++ src/app/layout.tsx | 2 ++ src/components/CookieConsent.tsx | 56 ++++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 src/app/cookie-policy/page.tsx create mode 100644 src/components/CookieConsent.tsx diff --git a/src/app/cookie-policy/page.tsx b/src/app/cookie-policy/page.tsx new file mode 100644 index 000000000..9ee406539 --- /dev/null +++ b/src/app/cookie-policy/page.tsx @@ -0,0 +1,40 @@ +import { Metadata } from 'next'; + +export const metadata: Metadata = { + title: 'นโยบายคุกกี้', + description: 'นโยบายการใช้งานคุกกี้ของเว็บไซต์บริษัท ดีล พลัส เทค จำกัด', +}; + +export default function CookiePolicy() { + return ( +
+
+

นโยบายคุกกี้

+

Cookie Policy - ปรับปรุงล่าสุด: 10 มีนาคม 2026

+ +
+
+

1. คุกกี้คืออะไร?

+

+ คุกกี้ (Cookie) คือไฟล์ข้อความขนาดเล็กที่เว็บไซต์บันทึกลงบนอุปกรณ์ของท่าน + คุกกี้ช่วยให้เว็บไซต์จดจำการกระทำและความชอบของท่าน ทำให้ประสบการณ์การใช้งานดีขึ้น +

+
+ +
+

2. การจัดการคุกกี้

+

ท่านสามารถจัดการการตั้งค่าคุกกี้ได้โดยแบนเนอร์คุกกี้ที่ปรากฏด้านล่างของเว็บไซต์

+
+ +
+

+ อ่านเพิ่มเติม:{' '} + นโยบายความเป็นส่วนตัว{' | '} + ข้อกำหนดและเงื่อนไข +

+
+
+
+
+ ); +} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 82bfff3cf..e4c0c7670 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -4,6 +4,7 @@ import '@/styles/globals.css'; import Header from '@/components/layout/Header'; import Footer from '@/components/layout/Footer'; import FloatingContact from '@/components/layout/FloatingContact'; +import CookieConsent from '@/components/CookieConsent'; import GoogleAnalytics from '@/components/analytics/GoogleAnalytics'; const kanit = Kanit({ @@ -146,6 +147,7 @@ export default function RootLayout({
{children}