branding only works when licensed

This commit is contained in:
miloschwartz
2025-10-15 22:07:33 -07:00
parent 003f0cfa6d
commit 2e0ad8d262
13 changed files with 145 additions and 129 deletions

View File

@@ -3,6 +3,7 @@
import { useEnvContext } from "@app/hooks/useEnvContext";
import { usePathname } from "next/navigation";
import Image from "next/image";
import { useLicenseStatusContext } from "@app/hooks/useLicenseStatusContext";
type SplashImageProps = {
children: React.ReactNode;
@@ -11,8 +12,12 @@ type SplashImageProps = {
export default function SplashImage({ children }: SplashImageProps) {
const pathname = usePathname();
const { env } = useEnvContext();
const { isUnlocked } = useLicenseStatusContext();
function showBackgroundImage() {
if (!isUnlocked()) {
return false;
}
if (!env.branding.background_image_path) {
return false;
}