Skip to content

Commit

Permalink
feat: move navigation out of home page
Browse files Browse the repository at this point in the history
  • Loading branch information
KatoakDR committed Sep 15, 2024
1 parent 39b68f4 commit 567e171
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions electron/renderer/pages/home.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
import { useRouter } from 'next/router';
import type { ReactNode } from 'react';
import { useEffect } from 'react';
import { type ReactNode, useEffect } from 'react';
import { useLogger } from '../hooks/logger.jsx';
import { runInBackground } from '../lib/async/run-in-background.js';

const HomePage: React.FC = (): ReactNode => {
const logger = useLogger('page:home');

const router = useRouter();

// TODO make the home page useful
// - display list of favorite characters?
// - display list of recent characters?

useEffect(() => {
runInBackground(async () => {
await router.push('/grid');
});
}, [router]);
logger.info('page loaded');
}, [logger]);

return <></>;
};
Expand Down

0 comments on commit 567e171

Please sign in to comment.