From 2ddf504764e9a15bd69b1ab403444e7a2beff29a Mon Sep 17 00:00:00 2001 From: Sean Liem Date: Sun, 9 Nov 2025 22:04:49 -0800 Subject: [PATCH] Lint problems --- front-end/components/AncientRunicPage.jsx | 118 +++++++++ front-end/components/ChatInput.jsx | 78 ++++++ front-end/components/ChatOutput.jsx | 66 +++++ front-end/components/FlipBook.jsx | 206 ++++++++++++++-- front-end/components/MapFragmentPage.jsx | 285 ++++++++++++++++++++++ 5 files changed, 732 insertions(+), 21 deletions(-) create mode 100644 front-end/components/AncientRunicPage.jsx create mode 100644 front-end/components/ChatInput.jsx create mode 100644 front-end/components/ChatOutput.jsx create mode 100644 front-end/components/MapFragmentPage.jsx diff --git a/front-end/components/AncientRunicPage.jsx b/front-end/components/AncientRunicPage.jsx new file mode 100644 index 0000000..c0a23f1 --- /dev/null +++ b/front-end/components/AncientRunicPage.jsx @@ -0,0 +1,118 @@ +import React from "react"; + +const AncientRunicPage = ({ + variant = "default", + centerText = "ᛋᚢᛗᛗᛟᚾᛖᚱ'ᛋ ᛏᛟᛗᛖ", + runeColor = "#8b7355", + runeCount = 9 +}) => { + // Different rune sets for variety + const runeSymbols = { + default: ["ᚠ", "ᚢ", "ᚦ", "ᚨ", "ᚱ", "ᚲ", "ᚷ", "ᚹ", "ᚺ", "ᚾ", "ᛁ", "ᛃ"], + power: ["ᛉ", "ᛊ", "ᛏ", "ᛒ", "ᛖ", "ᛗ", "ᛚ", "ᛜ", "ᛞ", "ᛟ"], + mystical: ["◉", "◈", "◊", "✦", "✧", "✺", "✹", "❂", "✶", "✷"], + elements: ["🜁", "🜂", "🜃", "🜄", "☿", "♀", "♂", "♃", "♄", "⚡"], + }; + + const runes = React.useMemo(() => { + const runes = []; + const usedRunes = (runeSymbols[variant] || runeSymbols.default).slice(0, runeCount); + + for (let i = 0; i < usedRunes.length; i++) { + runes.push({ + symbol: usedRunes[i], + x: `${15 + (Math.random() * 70)}%`, + y: `${15 + (Math.random() * 70)}%`, + rotation: Math.random() * 360, + opacity: 0.3 + Math.random() * 0.4, + }); + } + return runes; + }, [variant, runeCount]); + + // Different circle patterns based on variant + const circlePatterns = { + default: { circles: 3 }, + power: { circles: 5 }, + mystical: { circles: 4 }, + elements: { circles: 2 }, + }; + + const pattern = circlePatterns[variant] || circlePatterns.default; + + return ( +
+ + + {/* Central decorative circles */} + {Array.from({ length: pattern.circles }).map((_, i) => ( +
+ ))} + + {/* Static runes */} + {runes.map((rune, index) => ( +
+ {rune.symbol} +
+ ))} + + {/* Ancient text at bottom */} + {centerText && ( +
+ {centerText} +
+ )} +
+ ); +}; + +export default AncientRunicPage; \ No newline at end of file diff --git a/front-end/components/ChatInput.jsx b/front-end/components/ChatInput.jsx new file mode 100644 index 0000000..f13ba98 --- /dev/null +++ b/front-end/components/ChatInput.jsx @@ -0,0 +1,78 @@ +import React, { useState } from "react"; + +const ChatInput = ({ onSendMessage, isLoading }) => { + const [input, setInput] = useState(""); + + const handleSubmit = (e) => { + e.preventDefault(); + if (!input.trim() || isLoading) return; + + onSendMessage(input); + setInput(""); + }; + + const handleKeyPress = (e) => { + if (e.key === 'Enter' && !e.shiftKey) { + e.preventDefault(); + handleSubmit(e); + } + }; + + return ( +
+

Ask the Book

+ +
+
+

+ Ask questions about your gameplay, get strategic advice, or learn more about your matches. +

+
+ +
+
+