From b4cab18ecd2ea9af742334f2978af46a3abb6d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Sun, 24 Sep 2023 17:24:21 -0500 Subject: [PATCH] feat: moved tools outside page --- src/app/page.tsx | 37 ++---------------------------------- src/app/tools/layout.tsx | 2 +- src/components/SearchBar.tsx | 1 - src/constants/tools.ts | 33 ++++++++++++++++++++++++++++++++ 4 files changed, 36 insertions(+), 37 deletions(-) create mode 100644 src/constants/tools.ts diff --git a/src/app/page.tsx b/src/app/page.tsx index e1bf18b6b..89f8e6457 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -6,49 +6,16 @@ import { useRef } from 'react'; import { Search, SearchItem } from 'react-fuzzysort'; import PageWrapper from '../components/PageWrapper'; import { SearchBar } from '../components/SearchBar'; +import { TOOLS } from '../constants/tools'; import { theme } from '../stitches.config'; import * as styles from './page.css'; -export const TOOLS = [ - { - id: 'session', - title: 'Session tracker', - description: 'Track your performance in a session', - }, - { - id: 'ratings', - title: 'Ratings', - description: 'Current and old season leader boards', - }, - { - id: 'tankopedia', - title: 'Tankopedia', - description: 'Full Blitz tank encyclopedia', - }, - { - id: 'inactive', - title: 'Inactivity tracker', - description: 'Find inactive members of a clan', - }, - { - id: 'profile', - title: 'Player profile', - description: "A player's basic non-statistical info", - }, - // { - // title: 'More coming soon', - // description: 'New tools are added often', - // banner: '/assets/banners/more.png', - // id: 'https://discord.gg/nDt7AjGJQH', - // }, -]; - export default function Page() { const input = useRef(null); return ( - +
>( outline: 'none', fontSize: 'inherit', }} - placeholder="Search tools..." />
); diff --git a/src/constants/tools.ts b/src/constants/tools.ts new file mode 100644 index 000000000..e957ab07c --- /dev/null +++ b/src/constants/tools.ts @@ -0,0 +1,33 @@ +export const TOOLS = [ + { + id: 'session', + title: 'Session tracker', + description: 'Track your performance in a session', + }, + // { + // id: 'ratings', + // title: 'Ratings', + // description: 'Current and old season leader boards', + // }, + // { + // id: 'tankopedia', + // title: 'Tankopedia', + // description: 'Full Blitz tank encyclopedia', + // }, + // { + // id: 'inactive', + // title: 'Inactivity tracker', + // description: 'Find inactive members of a clan', + // }, + // { + // id: 'profile', + // title: 'Player profile', + // description: "A player's basic non-statistical info", + // }, + // { + // title: 'More coming soon', + // description: 'New tools are added often', + // banner: '/assets/banners/more.png', + // id: 'https://discord.gg/nDt7AjGJQH', + // }, +];