'use client' import { useEffect, useState } from 'react' import { authFetch, clearToken, getApiBase } from '../lib/auth' import '../welcome.css' export default function WelcomePage() { const [ready, setReady] = useState(false) const [url, setUrl] = useState(null) const [error, setError] = useState('') useEffect(() => { const controller = new AbortController() void (async () => { try { const response = await authFetch(`${getApiBase()}/site/info`, { signal: controller.signal }) if (response.status === 401) { clearToken(); window.location.replace('/login'); return } if (!response.ok) throw new Error('Unavailable') const data = await response.json() const candidate = data.mediaServerUrl ? new URL(data.mediaServerUrl) : null if (candidate && ['https:', 'http:'].includes(candidate.protocol) && !candidate.username && !candidate.password) setUrl(candidate.href) setReady(true) } catch { if (!controller.signal.aborted) setError('We couldn’t load your welcome page. Please try again.') } })() return () => controller.abort() }, []) return
GrizzlyFlix + Magent

Make yourself at home.

Something to watch, or something to sort out?

{error ?

{error}

Back to sign in
: !ready ?

Getting things ready…

:
{url ?

Go to GrizzlyFlix

Find your next favourite. Watch movies and TV shows.

Let’s watch
:

Go to GrizzlyFlix

The watch link hasn’t been set up yet. Please ask an admin to add the public playback URL.

}

Manage your account

Track requests, report a problem, or update your profile.

Open 01 My Requests
}
}