fix hydration error

This commit is contained in:
chark1es 2025-03-06 03:04:07 -08:00
parent 3b1a1d9132
commit e4ea6caa7f

View file

@ -2,8 +2,8 @@ import { useEffect, useState } from "react";
import { Authentication } from "../../../scripts/pocketbase/Authentication"; import { Authentication } from "../../../scripts/pocketbase/Authentication";
import { Get } from "../../../scripts/pocketbase/Get"; import { Get } from "../../../scripts/pocketbase/Get";
import { Collections } from "../../../schemas/pocketbase"; import { Collections } from "../../../schemas/pocketbase";
import { Icon } from "astro-icon/components";
import type { Log } from "../../../schemas/pocketbase"; import type { Log } from "../../../schemas/pocketbase";
import { Icon } from "@iconify/react";
// Extend the Log type to include expand property // Extend the Log type to include expand property
interface ExtendedLog extends Log { interface ExtendedLog extends Log {
@ -155,7 +155,7 @@ export default function AdminSystemActivity({
if (error) { if (error) {
return ( return (
<div className="alert alert-error"> <div className="alert alert-error">
<Icon name="heroicons:exclamation-circle" class="h-5 w-5" /> <Icon icon="heroicons:exclamation-circle" className="h-5 w-5" />
<span>{error}</span> <span>{error}</span>
</div> </div>
); );
@ -164,7 +164,7 @@ export default function AdminSystemActivity({
if (logs.length === 0) { if (logs.length === 0) {
return ( return (
<div className="alert alert-info"> <div className="alert alert-info">
<Icon name="heroicons:information-circle" class="h-5 w-5" /> <Icon icon="heroicons:information-circle" className="h-5 w-5" />
<span>No system logs found</span> <span>No system logs found</span>
</div> </div>
); );
@ -193,8 +193,8 @@ export default function AdminSystemActivity({
<td> <td>
<div className="flex items-center gap-1"> <div className="flex items-center gap-1">
<Icon <Icon
name={getLogTypeIcon(log.type)} icon={getLogTypeIcon(log.type)}
class={`h-4 w-4 ${getLogTypeColor(log.type)}`} className={`h-4 w-4 ${getLogTypeColor(log.type)}`}
/> />
<span className="capitalize">{log.type}</span> <span className="capitalize">{log.type}</span>
</div> </div>