From 5042f687de4a4fc0bcd37dd049a618e5cc3aec9c Mon Sep 17 00:00:00 2001 From: Sakura Knoll Date: Sat, 1 Jan 2022 21:21:10 +0900 Subject: [PATCH] Refactor weapon list page --- src/pages/honkai3rd/weapons/index.tsx | 65 +++++++++++---------------- 1 file changed, 25 insertions(+), 40 deletions(-) diff --git a/src/pages/honkai3rd/weapons/index.tsx b/src/pages/honkai3rd/weapons/index.tsx index 2675a336..58dbaf5a 100644 --- a/src/pages/honkai3rd/weapons/index.tsx +++ b/src/pages/honkai3rd/weapons/index.tsx @@ -1,6 +1,5 @@ /** @jsxImportSource theme-ui */ -import { Text, Box, Heading, Flex, Link } from '@theme-ui/components' -import NextLink from 'next/link' +import { Text, Box, Heading, Flex, Card } from '@theme-ui/components' import Breadcrumb from '../../../components/organisms/Breadcrumb' import Honkai3rdNavigator from '../../../components/organisms/Honkai3rdNavigator' import { listWeapons } from '../../../server/data/honkai3rd/weapons' @@ -10,6 +9,7 @@ import { useMemo } from 'react' import FilterButton from '../../../components/atoms/FilterButton' import { useRouter } from 'next/router' import { WeaponData } from '../../../lib/honkai3rd/weapons' +import PageLink from '../../../components/atoms/PageLink' type WeaponListItemData = Pick< WeaponData, @@ -48,55 +48,40 @@ const WeaponListPage = ({ weaponDataList }: WeaponListPageProps) => { return weaponDataList.map((weapon) => { const hidden = isWeaponHidden(weapon, filter) return ( - - - - - - {weapon.name} - - - {'⭐'.repeat(weapon.rarity)} - - - - + + + + {weapon.name} + + + {'⭐'.repeat(weapon.rarity)} + + + ) }) }, [weaponDataList, filter])