import { Routes, Route } from 'react-router-dom';
import { ReactElement, useEffect } from 'react';
import Navigation from './Navigation';
import Conversation from './conversation/Conversation';
import About from './About';
import PageNotFound from './PageNotFound';
import { inject } from '@vercel/analytics';
import { useMediaQuery } from './hooks';
import { useState } from 'react';
import Setting from './settings';
import './locale/i18n';
import SharedConversation from './conversation/SharedConversation';
import { useDarkTheme } from './hooks';
inject();
function MainLayout({ children }: { children: ReactElement }) {
const { isMobile } = useMediaQuery();
const [navOpen, setNavOpen] = useState(!isMobile);
return (
<>