2eee5195cc
* new react and reactdom packages in wallet * new react and reactdom packages in root * new react and reactdom packages in nym connect * new react and reactdom packages in root * update react and reactdom for explorer * react and react-dom upgrade for ts-packages remove unused import fix linting error * use custom FC typing move typings folder * fix type error
23 lines
450 B
TypeScript
23 lines
450 B
TypeScript
import * as React from 'react';
|
|
import { Nav } from './components/Nav';
|
|
import { MobileNav } from './components/MobileNav';
|
|
import { Routes } from './routes/index';
|
|
import { useIsMobile } from './hooks/useIsMobile';
|
|
|
|
export const App: FCWithChildren = () => {
|
|
const isMobile = useIsMobile();
|
|
|
|
if (isMobile) {
|
|
return (
|
|
<MobileNav>
|
|
<Routes />
|
|
</MobileNav>
|
|
);
|
|
}
|
|
return (
|
|
<Nav>
|
|
<Routes />
|
|
</Nav>
|
|
);
|
|
};
|