Skip to content

Commit 2fc6ee2

Browse files
committed
fix: correct RuleExplanation type definition and function argument
1 parent 8c49888 commit 2fc6ee2

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/lib/rules-explanation.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@ import lifespan from "$lib/assets/life-game-rules/lifespan.js?raw";
22
import probabilistics from "$lib/assets/life-game-rules/probabilistics.js?raw";
33

44
export type RuleExplanation = {
5+
name: {
6+
ja: string;
7+
en: string;
8+
};
9+
description: {
10+
ja: string;
11+
en: string;
12+
};
513
code: string;
6-
ja: string;
7-
en: string;
814
};
9-
1015
export const rulesExplanation = {
1116
lifespan: {
1217
name: {

src/routes/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@
236236
<button
237237
class="card bg-base-100 shadow-md hover:shadow-lg transition-shadow cursor-pointer text-left flex-shrink-0 w-64"
238238
onclick={() => {
239-
selectRule(ruleData.name as RuleExplanation);
239+
selectRule(ruleData as RuleExplanation);
240240
ruleDrawerOpen = false;
241241
}}
242242
>

0 commit comments

Comments
 (0)