mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-05 03:02:56 +00:00
dev day #63
This commit is contained in:
@@ -13,7 +13,7 @@ import { SearchResult } from '../services/facr/types';
|
||||
import { extractPalette, pickTextColor, generateJwtSecret, contrastRatio, isContrastAccessible, generateThemeCandidates, ThemeCandidate, adjustForContrast } from '../utils/colors';
|
||||
import { clearToken, setHasAdmin } from '../utils/auth';
|
||||
import ContactMap from '../components/home/ContactMap';
|
||||
import { FONT_PAIRINGS, loadGoogleFont, getFontStyleColor } from '../config/fonts';
|
||||
import { FONT_PAIRINGS, applyFontPairing, getFontStyleColor } from '../config/fonts';
|
||||
import MapLinkImporter from '../components/admin/MapLinkImporter';
|
||||
import MapStyleSelector from '../components/admin/MapStyleSelector';
|
||||
import { MapCoordinates } from '../utils/mapUrlParser';
|
||||
@@ -165,14 +165,21 @@ const SetupPage: React.FC = () => {
|
||||
return () => clearTimeout(t);
|
||||
}, [clubQuery, searchClubs]);
|
||||
|
||||
// Load selected font for preview
|
||||
// Load and apply selected font for preview
|
||||
useEffect(() => {
|
||||
const pairing = FONT_PAIRINGS.find((f) => f.id === selectedFont);
|
||||
if (pairing) {
|
||||
loadGoogleFont(pairing.googleFontsUrl);
|
||||
applyFontPairing(pairing);
|
||||
}
|
||||
}, [selectedFont]);
|
||||
|
||||
// Auto-fill SMTP username from contact email
|
||||
useEffect(() => {
|
||||
if (contactEmail && !smtpUser) {
|
||||
setSmtpUser(contactEmail);
|
||||
}
|
||||
}, [contactEmail, smtpUser]);
|
||||
|
||||
const handleSelectClub = async (item: SearchResult) => {
|
||||
const clubIdValue = item.club_id || '';
|
||||
setClubId(clubIdValue);
|
||||
|
||||
Reference in New Issue
Block a user