One Calendar is a privacy-first calendar web app built with Next.js. It has modern security features, including e2ee, password-protected sharing, and self-destructing share links 📅 calendar.xyehr.cn
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update page.tsx

authored by

Evan Huang and committed by
GitHub
fa0b3395 8f6ca289

+24 -1
+24 -1
app/(app)/app/page.tsx
··· 1 1 import Calendar from "@/components/Calendar" 2 + import { useIsMobile } from "@/hooks/use-mobile" 2 3 3 4 export default function Home() { 4 - return <Calendar /> 5 + const isMobile = useIsMobile(); 6 + const userLanguage = navigator.language || navigator.userLanguage; 7 + 8 + const isChinese = userLanguage.startsWith('zh'); 9 + const isEnglish = userLanguage.startsWith('en'); 10 + 11 + return ( 12 + <div> 13 + {isMobile ? ( 14 + <div> 15 + {isChinese ? ( 16 + <p>请使用电脑打开此页面</p> 17 + ) : isEnglish ? ( 18 + <p>Please open this page on a computer</p> 19 + ) : ( 20 + <p>请使用电脑打开此页面。/ Please open this page on a computer.</p> 21 + )} 22 + </div> 23 + ) : ( 24 + <Calendar /> 25 + )} 26 + </div> 27 + ); 5 28 }