Compare commits

...

3 Commits

Author SHA1 Message Date
gpt-engineer-app[bot]
3097c7c1be Revert Supabase URL changes 2025-11-01 15:37:41 +00:00
gpt-engineer-app[bot]
456ce98c0b Fix Supabase URL configuration 2025-11-01 15:35:06 +00:00
gpt-engineer-app[bot]
ed75bbbc9d feat: Hide MFA for non-moderators 2025-11-01 15:25:40 +00:00
3 changed files with 22 additions and 18 deletions

2
.env
View File

@@ -1,4 +1,5 @@
VITE_ALLOW_CAPTCHA_BYPASS="true"
VITE_SUPABASE_URL="https://api.thrillwiki.com"
VITE_BASE_URL="https://www.thrillwiki.com"
VITE_CLOUDFLARE_ACCOUNT_HASH="X-2-mmiWukWxvAQQ2_o-7Q"
VITE_NOVU_API_URL="https://api.novu.co"
@@ -6,5 +7,4 @@ VITE_NOVU_APPLICATION_IDENTIFIER=""
VITE_NOVU_SOCKET_URL="wss://ws.novu.co"
VITE_SUPABASE_PROJECT_ID="ydvtmnrszybqnbcqbdcy"
VITE_SUPABASE_PUBLISHABLE_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InlkdnRtbnJzenlicW5iY3FiZGN5Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTgzMjYzNTYsImV4cCI6MjA3MzkwMjM1Nn0.DM3oyapd_omP5ZzIlrT0H9qBsiQBxBRgw2tYuqgXKX4"
VITE_SUPABASE_URL="https://ydvtmnrszybqnbcqbdcy.supabase.co"
VITE_TURNSTILE_SITE_KEY="1x00000000000000000000AA"

View File

@@ -145,7 +145,7 @@ export function FeaturedParks() {
</div>
<div className="grid md:grid-cols-3 gap-6">
{topRated.data?.map((park) => (
{topRatedParks.map((park) => (
<FeaturedParkCard
key={park.id}
park={park}
@@ -166,7 +166,7 @@ export function FeaturedParks() {
</div>
<div className="grid md:grid-cols-3 gap-6">
{mostRides.data?.map((park) => (
{mostRidesParks.map((park) => (
<FeaturedParkCard
key={park.id}
park={park}

View File

@@ -6,6 +6,7 @@ import { Separator } from '@/components/ui/separator';
import { Badge } from '@/components/ui/badge';
import { handleError, handleSuccess } from '@/lib/errorHandler';
import { useAuth } from '@/hooks/useAuth';
import { useUserRole } from '@/hooks/useUserRole';
import { Shield, Key, Smartphone, Globe, Loader2, Monitor, Tablet, Trash2 } from 'lucide-react';
import { format } from 'date-fns';
import { Skeleton } from '@/components/ui/skeleton';
@@ -28,6 +29,7 @@ import { SessionRevokeConfirmDialog } from './SessionRevokeConfirmDialog';
export function SecurityTab() {
const { user } = useAuth();
const { isModerator } = useUserRole();
const navigate = useNavigate();
const [passwordDialogOpen, setPasswordDialogOpen] = useState(false);
const [identities, setIdentities] = useState<UserIdentity[]>([]);
@@ -370,21 +372,23 @@ export function SecurityTab() {
</Card>
</div>
{/* Two-Factor Authentication - Full Width */}
<Card>
<CardHeader>
<div className="flex items-center gap-2">
<Smartphone className="w-5 h-5" />
<CardTitle>Two-Factor Authentication</CardTitle>
</div>
<CardDescription>
Add an extra layer of security to your account with TOTP authentication
</CardDescription>
</CardHeader>
<CardContent>
<TOTPSetup />
</CardContent>
</Card>
{/* Two-Factor Authentication - Full Width (Moderators+ Only) */}
{isModerator() && (
<Card>
<CardHeader>
<div className="flex items-center gap-2">
<Smartphone className="w-5 h-5" />
<CardTitle>Two-Factor Authentication</CardTitle>
</div>
<CardDescription>
Add an extra layer of security to your account with TOTP authentication
</CardDescription>
</CardHeader>
<CardContent>
<TOTPSetup />
</CardContent>
</Card>
)}
{/* Active Sessions - Full Width */}
<Card>