From f50b7912457f9347ffe9e3c974bfecb0aee99523 Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Thu, 3 Dec 2026 21:34:39 -0600 Subject: [PATCH] move section and curtains into recently viweed tanks --- CLAUDE.md | 7 ++- bun.lock | 5 +- package.json | 1 + .../components/RecentlyViewedTanks/index.tsx | 56 ++++++++++--------- .../[...locale]/tanks/index.astro | 9 +-- 5 files changed, 45 insertions(+), 33 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 2a06dcc6a..82ace21e7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,6 +1,11 @@ # BlitzKit -Read `README.md` for setup and running: the dev server starts with `scripts/dev-website.sh` (Bun, not npm/Node). +Read `README.md` for setup and running: the dev server starts with `scripts/dev-website.sh`. + +## Tooling + +- Use Bun only: `bun`, `bun x`, `bun run`. Never `npm`, `npx`, `node`, `yarn` or `pnpm`. +- Format with `bun x prettier --write `. ## Git diff --git a/bun.lock b/bun.lock index 8771ea49a..1373ec706 100644 --- a/bun.lock +++ b/bun.lock @@ -7,6 +7,7 @@ "dependencies": { "@gltf-transform/extensions": "^4.4.2", "lz4js": "^0.2.0", + "prettier": "^3.10.2", "sharp": "^0.34.5", "typescript": "^5.9.3", }, @@ -1997,7 +1998,7 @@ "potpack": ["potpack@1.0.2", "", {}, "sha512-choctRBIV9EMT9WGAZHn3V7t0Z2pMQyl0EZE6pFc/6ml3ssw7Dlf/oAOvFwjm1HVsqfQN8GfeFyJ+d8tRzqueQ=="], - "prettier": ["prettier@2.8.7", "", { "bin": { "prettier": "bin-prettier.js" } }, "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw=="], + "prettier": ["prettier@3.10.2", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-VQGIFOC0JNYLvfT57+Tre9wvgpc1Njx0JcnTDwRD6IFQGPTfPMghvi2A7gSwa/I0emKTK4KpBIN4mWYHyCDNDQ=="], "pretty-bytes": ["pretty-bytes@6.1.1", "", {}, "sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ=="], @@ -2777,6 +2778,8 @@ "wrap-ansi/strip-ansi": ["strip-ansi@7.1.2", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="], + "yaml-language-server/prettier": ["prettier@2.8.7", "", { "bin": { "prettier": "bin-prettier.js" } }, "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw=="], + "yaml-language-server/request-light": ["request-light@0.5.8", "", {}, "sha512-3Zjgh+8b5fhRJBQZoy+zbVKpAQGLyka0MPgW3zruTF4dFFJ8Fqcfu9YsAvi/rvdcaTeWG3MkbZv4WKxAn/84Lg=="], "yaml-language-server/vscode-languageserver": ["vscode-languageserver@7.0.0", "", { "dependencies": { "vscode-languageserver-protocol": "3.16.0" }, "bin": { "installServerIntoExtension": "bin/installServerIntoExtension" } }, "sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw=="], diff --git a/package.json b/package.json index 838927f68..2d2861bfa 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "dependencies": { "@gltf-transform/extensions": "^4.4.2", "lz4js": "^0.2.0", + "prettier": "^3.10.2", "sharp": "^0.34.5", "typescript": "^5.9.3" } diff --git a/packages/website/src/components/RecentlyViewedTanks/index.tsx b/packages/website/src/components/RecentlyViewedTanks/index.tsx index 4f8be6366..e97ecf49d 100644 --- a/packages/website/src/components/RecentlyViewedTanks/index.tsx +++ b/packages/website/src/components/RecentlyViewedTanks/index.tsx @@ -7,6 +7,8 @@ import { useStrings } from "../../hooks/useStrings"; import { TankFilters } from "../../stores/tankFilters"; import { TankopediaPersistent } from "../../stores/tankopediaPersistent"; import { TankSort } from "../../stores/tankopediaSort"; +import { ScrollerCurtains } from "../ScrollerCurtains"; +import { Section } from "../Section"; import { TankCard } from "../TankCard"; import { TankCardSkeleton } from "../TankCardSkeleton"; import { MAX_RECENTLY_VIEWED } from "../TankSearchResults/constants"; @@ -43,35 +45,39 @@ function Content() { } return ( -
- - {strings.website.common.tank_search.recent} - +
+ -
- {!mounted && - Array.from({ length: MAX_RECENTLY_VIEWED }, (_, index) => ( - - ))} +
+ + {strings.website.common.tank_search.recent} + - {mounted && recentlyViewed.length === 0 && ( - <> - +
+ {!mounted && + Array.from({ length: MAX_RECENTLY_VIEWED }, (_, index) => ( + + ))} - - {strings.website.common.tank_search.recent_empty} - - - )} + {mounted && recentlyViewed.length === 0 && ( + <> + - {mounted && - recentlyViewed.map((id) => ( - - ))} + + {strings.website.common.tank_search.recent_empty} + + + )} + + {mounted && + recentlyViewed.map((id) => ( + + ))} +
-
+
); } diff --git a/packages/website/src/pages/[...chunk_default]/[...locale]/tanks/index.astro b/packages/website/src/pages/[...chunk_default]/[...locale]/tanks/index.astro index a889f57c5..8eb6a2ccf 100644 --- a/packages/website/src/pages/[...chunk_default]/[...locale]/tanks/index.astro +++ b/packages/website/src/pages/[...chunk_default]/[...locale]/tanks/index.astro @@ -3,10 +3,10 @@ import ColorScale from "../../../../components/ColorScale.astro"; import { RecentlyViewedTanks } from "../../../../components/RecentlyViewedTanks"; import { ScrollerCurtains } from "../../../../components/ScrollerCurtains"; import { Section } from "../../../../components/Section"; +import Sections from "../../../../components/Sections.astro"; import { TankSearchBar } from "../../../../components/TankSearchBar"; import { TankSearchFilters } from "../../../../components/TankSearchFilters"; import { TankSearchResults } from "../../../../components/TankSearchResults"; -import Sections from "../../../../components/Sections.astro"; import ToolBanner from "../../../../components/ToolBanner.astro"; import { tools } from "../../../../config/tools"; import BaseLayout from "../../../../layouts/BaseLayout.astro"; @@ -24,11 +24,6 @@ const { locale } = Astro.props; -
- - -
-
@@ -38,6 +33,8 @@ const { locale } = Astro.props; + +