lookingglass/hyperglass/ui/components/layout/layout.tsx
2021-12-18 23:45:06 -07:00

19 lines
444 B
TypeScript

import { AnimatePresence } from 'framer-motion';
import { LookingGlassForm, Results } from '~/components';
import { useView } from '~/hooks';
import { Frame } from './frame';
export const Layout = (): JSX.Element => {
const view = useView();
return (
<Frame>
{view === 'results' ? (
<Results />
) : (
<AnimatePresence>
<LookingGlassForm />
</AnimatePresence>
)}
</Frame>
);
};