import type { ReactNode } from 'react' import { Link } from 'react-router-dom' import { BrandMark } from '../../components/BrandMark' import { Icon } from '../../components/Icon' import type { IconName } from '../../components/Icon' import { useInstanceFavicon } from '../../lib/usePublicConfig' import { useLegal } from '../../lib/useLegal' /** * Rama strony publicznej. * * Domyslnie WASKA (`max-w-2xl`): wiekszosc stron publicznych to jeden formularz * albo krotki komunikat, wygodniejszy na telefonie w waskiej kolumnie. * * `wide` przelacza na szerokosc panelu (`max-w-container`, 1200px) - dla stron, * ktore maja miescic wiecej tresci obok siebie i wygladac jak reszta serwisu: * strona zapisu na webinar oraz dokumenty prawne (regulamin, polityka). * Szerokosc ustawia layout, a nie poszczegolna strona - zgodnie z regula, ze * strona nie ustawia wlasnej szerokosci. */ export function PublicLayout({ children, wide = false }: { children: ReactNode; wide?: boolean }) { useInstanceFavicon() const legal = useLegal() const company = legal.data?.company // regulamin i polityka to gotowe dokumenty - sa zawsze dostepne, // wiec odnosniki pokazujemy bezwarunkowo (o ile dane w ogole sie zaladowaly) const ready = Boolean(legal.data) const widthClass = wide ? 'max-w-container' : 'max-w-2xl' return (
{text}
{children &&