Add PWA support and update app metadata for Deckerr

This commit is contained in:
Matthieu
2025-11-21 16:41:47 +01:00
parent 57f0e7efe7
commit 73b7735074
19 changed files with 9454 additions and 186 deletions

View File

@@ -8,6 +8,7 @@ import React, { useState } from 'react';
import Profile from './components/Profile';
import CardSearch from './components/CardSearch';
import LifeCounter from './components/LifeCounter';
import PWAInstallPrompt from './components/PWAInstallPrompt';
import { AuthProvider, useAuth } from './contexts/AuthContext';
type Page = 'home' | 'deck' | 'login' | 'collection' | 'edit-deck' | 'profile' | 'search' | 'life-counter';
@@ -38,9 +39,9 @@ import React, { useState } from 'react';
switch (currentPage) {
case 'home':
return (
<div className="min-h-screen bg-gray-900 text-white p-6 animate-fade-in">
<div className="min-h-screen bg-gray-900 text-white p-3 sm:p-6 md:pt-16 pb-16 md:pb-0 animate-fade-in">
<div className="max-w-7xl mx-auto">
<h1 className="text-3xl font-bold mb-6 animate-slide-in-left">My Decks</h1>
<h1 className="text-2xl md:text-3xl font-bold mb-4 md:mb-6 animate-slide-in-left">My Decks</h1>
<DeckList onDeckEdit={handleDeckEdit} />
</div>
</div>
@@ -76,6 +77,7 @@ import React, { useState } from 'react';
<div className="min-h-screen bg-gray-900">
<Navigation currentPage={currentPage} setCurrentPage={setCurrentPage} />
{renderPage()}
<PWAInstallPrompt />
</div>
);
}