Update all pages to use PageHeader

This commit is contained in:
Cooldude2606 authored and Daniel committed 2024-06-14 19:20:07 +02:00
1 parent 51657bea44
commit 1f47f6dfc9
6 files changed
+12 -10

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
import React, { useContext, useEffect, useState } from "react";
import { BaseWebPlugin, PageLayout, ControlContext } from "@clusterio/web_ui";
import { BaseWebPlugin, PageLayout, PageHeader, ControlContext } from "@clusterio/web_ui";
import { DatabaseStatsRequest, DatabaseStatsResponse } from "../messages";
import "./style.css";
@@ -18,7 +18,7 @@ function InventoryPage() {
}, []);
return <PageLayout nav={[{ name: "Inventory sync" }]}>
<h2>Inventory sync</h2>
<PageHeader title="Inventory sync" />
{statsData && <>
<p>Database size: {Math.round(statsData.databaseSize / 1000)}kB</p>
<p>Database entries: {statsData.databaseEntries}</p>
+2 -2
View File
@@ -3,7 +3,7 @@ import { Input, Table, Typography } from "antd";
import * as lib from "@clusterio/lib";
import {
BaseWebPlugin, PageLayout, Control, ControlContext,
BaseWebPlugin, PageLayout, PageHeader, Control, ControlContext,
notifyErrorHandler, useItemMetadata, useLocale,
} from "@clusterio/web_ui";
import { GetStorageRequest, Item, SetStorageSubscriptionRequest, UpdateStorageEvent } from "../messages";
@@ -60,7 +60,7 @@ function StoragePage() {
let numberFormat = new Intl.NumberFormat("en-US");
return <PageLayout nav={[{ name: "Storage" }]}>
<h2>Storage</h2>
<PageHeader title="Storage" />
<Paragraph>
<Input
placeholder="Search"