refactor: consolidate game components and add toast notifications
- Remove EndlosGame support and GameDetail141.jsx component - Add Toast notification system with CSS styling - Refactor GameCompletionModal with enhanced styling - Improve GameDetail component structure and styling - Add BaseLayout.astro for consistent page structure - Update gameService with cleaner logic - Enhance global styles and remove unused constants - Streamline navigation components
This commit is contained in:
@@ -479,7 +479,7 @@ const Player3Step = ({ playerNameHistory, onNext, onCancel, initialValue = '' })
|
||||
*/
|
||||
const GameTypeStep = ({ onNext, onCancel, initialValue = '' }) => {
|
||||
const [gameType, setGameType] = useState(initialValue);
|
||||
const gameTypes = ['8-Ball', '9-Ball', '10-Ball', '14/1 endlos'];
|
||||
const gameTypes = ['8-Ball', '9-Ball', '10-Ball'];
|
||||
|
||||
const handleSelect = (selectedType) => {
|
||||
setGameType(selectedType);
|
||||
@@ -561,14 +561,8 @@ const GameTypeStep = ({ onNext, onCancel, initialValue = '' }) => {
|
||||
* @returns {import('preact').VNode}
|
||||
*/
|
||||
const RaceToStep = ({ onNext, onCancel, initialValue = '', gameType }) => {
|
||||
let quickPicks, defaultValue;
|
||||
if (gameType === '14/1 endlos') {
|
||||
quickPicks = [60, 70, 80, 90, 100];
|
||||
defaultValue = 80;
|
||||
} else {
|
||||
quickPicks = [1, 2, 3, 4, 5, 6, 7, 8, 9];
|
||||
defaultValue = 5;
|
||||
}
|
||||
const quickPicks = [1, 2, 3, 4, 5, 6, 7, 8, 9];
|
||||
const defaultValue = 5;
|
||||
const [raceTo, setRaceTo] = useState(initialValue !== '' ? initialValue : defaultValue);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user