rename and tidy up

This commit is contained in:
Jon Eugster
2023-05-22 21:20:24 +02:00
parent fbf0f55968
commit 3bf5c5e5e8
5 changed files with 71 additions and 128 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ import './inventory.css'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faLock, faLockOpen, faBook, faHammer, faBan } from '@fortawesome/free-solid-svg-icons'
import Markdown from './Markdown';
import { useLoadDocQuery, ComputedInventoryItem, LevelInfo } from '../state/api';
import { useLoadDocQuery, InventoryTile, LevelInfo } from '../state/api';
import { GameIdContext } from '../App';
export function Inventory({levelInfo, setInventoryDoc } :
@@ -37,7 +37,7 @@ export function Inventory({levelInfo, setInventoryDoc } :
function InventoryList({items, docType, openDoc, defaultTab=null, level=undefined} :
{
items: ComputedInventoryItem[],
items: InventoryTile[],
docType: string,
openDoc(name: string, type: string): void,
defaultTab? : string,
+4 -4
View File
@@ -10,7 +10,7 @@ interface GameInfo {
conclusion: null|string,
}
export interface ComputedInventoryItem {
export interface InventoryTile {
name: string,
displayName: string,
category: string,
@@ -24,9 +24,9 @@ export interface LevelInfo {
introduction: null|string,
conclusion: null|string,
index: number,
tactics: ComputedInventoryItem[],
lemmas: ComputedInventoryItem[],
definitions: ComputedInventoryItem[],
tactics: InventoryTile[],
lemmas: InventoryTile[],
definitions: InventoryTile[],
descrText: null|string,
descrFormat: null|string,
lemmaTab: null|string,