forked from mirrors/thatmattlove-hyperglass
19 lines
444 B
TypeScript
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>
|
|
);
|
|
};
|