feat: migrate compare

This commit is contained in:
tresabhi committed 2025-05-15 23:54:07 -05:00
1 parent b90b355f8f
commit e656b83719
6 files changed
+61 -33

No files matched your search

+2
View File
@@ -741,6 +741,8 @@
},
"website": {
"redirect": "Redirecting to %s1... Didn't happen automatically? Click here.",
"settings": {
"dev_mode": "Development mode",
"language": "Language"
@@ -0,0 +1,19 @@
---
import { literals } from '@blitzkit/i18n';
import { getStrings } from '../core/i18n/getStrings';
export interface Props {
tool: string;
}
const { tool } = Astro.props;
const { locale } = Astro.params;
const strings = getStrings(locale);
const url = `/${locale === undefined ? '' : `${locale}/`}${tool}`;
---
<meta http-equiv="refresh" content={`0; url=${url}`} />
<a href={url}>
{literals(strings.website.redirect, [url])}
</a>
@@ -1,26 +1,26 @@
import { createDefaultSkills } from '@blitzkit/core';
import { Flex, Heading, Text } from '@radix-ui/themes';
import { useEffect, useMemo, useState } from 'react';
import { CompareTable } from '../../../../components/Compare/CompareTable';
import { Controls } from '../../../../components/Compare/Controls';
import { DamageWarning } from '../../../../components/DamageWarning';
import { PageWrapper } from '../../../../components/PageWrapper';
import { awaitableEquipmentDefinitions } from '../../../../core/awaitables/equipmentDefinitions';
import { awaitableModelDefinitions } from '../../../../core/awaitables/modelDefinitions';
import { awaitableProvisionDefinitions } from '../../../../core/awaitables/provisionDefinitions';
import { awaitableSkillDefinitions } from '../../../../core/awaitables/skillDefinitions';
import { awaitableTankDefinitions } from '../../../../core/awaitables/tankDefinitions';
import { tankCharacteristics } from '../../../../core/blitzkit/tankCharacteristics';
import { tankToCompareMember } from '../../../../core/blitzkit/tankToCompareMember';
import { CompareTable } from '../../../components/Compare/CompareTable';
import { Controls } from '../../../components/Compare/Controls';
import { DamageWarning } from '../../../components/DamageWarning';
import { PageWrapper } from '../../../components/PageWrapper';
import { awaitableEquipmentDefinitions } from '../../../core/awaitables/equipmentDefinitions';
import { awaitableModelDefinitions } from '../../../core/awaitables/modelDefinitions';
import { awaitableProvisionDefinitions } from '../../../core/awaitables/provisionDefinitions';
import { awaitableSkillDefinitions } from '../../../core/awaitables/skillDefinitions';
import { awaitableTankDefinitions } from '../../../core/awaitables/tankDefinitions';
import { tankCharacteristics } from '../../../core/blitzkit/tankCharacteristics';
import { tankToCompareMember } from '../../../core/blitzkit/tankToCompareMember';
import {
type LocaleAcceptorProps,
LocaleProvider,
useLocale,
type LocaleAcceptorProps,
} from '../../../../hooks/useLocale';
import { App } from '../../../../stores/app';
import { CompareEphemeral } from '../../../../stores/compareEphemeral';
import { ComparePersistent } from '../../../../stores/comparePersistent';
import { TankopediaPersistent } from '../../../../stores/tankopediaPersistent';
} from '../../../hooks/useLocale';
import { App } from '../../../stores/app';
import { CompareEphemeral } from '../../../stores/compareEphemeral';
import { ComparePersistent } from '../../../stores/comparePersistent';
import { TankopediaPersistent } from '../../../stores/tankopediaPersistent';
const [
modelDefinitions,
@@ -0,0 +1,16 @@
---
import ToolOpenGraph from '../../../components/ToolOpenGraph.astro';
import { compareTool } from '../../../constants/tools';
import BaseLayout from '../../../layouts/BaseLayout.astro';
import { Page } from './_index';
export { getStaticPaths } from '../index.astro';
const { locale } = Astro.params;
---
<ToolOpenGraph tool={compareTool} />
<BaseLayout noFooter>
<Page {locale} client:load />
</BaseLayout>
@@ -0,0 +1,7 @@
---
import ToolRedirect from '../../../components/ToolRedirect.astro';
export { getStaticPaths } from '../index.astro';
---
<ToolRedirect tool="compare" />
@@ -1,16 +0,0 @@
---
import ToolOpenGraph from '../../../../components/ToolOpenGraph.astro';
import { compareTool } from '../../../../constants/tools';
import BaseLayout from '../../../../layouts/BaseLayout.astro';
import { Page } from './_index';
export { getStaticPaths } from '../../index.astro';
const { locale } = Astro.params;
---
<ToolOpenGraph tool={compareTool} />
<BaseLayout noFooter>
<Page {locale} client:load />
</BaseLayout>