diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index e1ee392..dad9d0a 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -26,6 +26,8 @@ import { useAppLayout } from "contexts/AppLayoutContext"; import { Button } from "components/Inputs/Button"; import { OpenGraph } from "helpers/openGraph"; import { getDefaultPreferredLanguages } from "helpers/locales"; +import useIsClient from "hooks/useIsClient"; +import { useBoolean } from "hooks/useBoolean"; /* * ╭─────────────╮ @@ -191,6 +193,21 @@ export const AppLayout = ({ return "grid-cols-[20rem_0px_1fr]"; }, [mainPanelReduced, subPanel]); + const isClient = useIsClient(); + const { state: hasDisgardSafariWarning, setTrue: disgardSafariWarning } = + useBoolean(false); + const isSafari = useMemo(() => { + if (isClient) { + const useAgent = navigator.userAgent.toLowerCase(); + return ( + useAgent.includes("safari") || + useAgent.includes("iphone") || + useAgent.includes("ipad") + ); + } + return false; + }, [isClient]); + return (
- + null}> +

Hi, you are using Safari!

+

+ In most cases this wouldn't be a problem but our website is—for some + obscure reason—performing terribly on Safari (WebKit). Because of + that, we have decided to display this message instead of letting you + have a slow and painful experience. We are looking into the problem, + and are hoping to fix this soon. +

+

+ In the meanwhile, if you are using an iPhone/iPad, please try using + another device. +

+

+ If you are on macOS, please use another browser such as Firefox or + Chrome. +

+ +