Extract dashboard EmptyState component
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { useEffect, useMemo, useState, type ReactNode } from 'react';
|
import { useEffect, useMemo, useState } from 'react';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
type ClaudeAccountSummary,
|
type ClaudeAccountSummary,
|
||||||
@@ -53,6 +53,7 @@ import {
|
|||||||
} from './DashboardNav';
|
} from './DashboardNav';
|
||||||
import { isInternalProtocolPayload } from './roomThread';
|
import { isInternalProtocolPayload } from './roomThread';
|
||||||
import { RoomBoardV2 } from './RoomBoardV2';
|
import { RoomBoardV2 } from './RoomBoardV2';
|
||||||
|
import { EmptyState } from './EmptyState';
|
||||||
import { ParsedBody } from './ParsedBody';
|
import { ParsedBody } from './ParsedBody';
|
||||||
import { redactSecretsForPreview } from './redaction';
|
import { redactSecretsForPreview } from './redaction';
|
||||||
import './styles.css';
|
import './styles.css';
|
||||||
@@ -628,10 +629,6 @@ function inboxTargetHref(item: InboxItem): string | null {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function EmptyState({ children }: { children: ReactNode }) {
|
|
||||||
return <div className="empty-state">{children}</div>;
|
|
||||||
}
|
|
||||||
|
|
||||||
function LanguageSelector({
|
function LanguageSelector({
|
||||||
locale,
|
locale,
|
||||||
onLocaleChange,
|
onLocaleChange,
|
||||||
|
|||||||
5
apps/dashboard/src/EmptyState.tsx
Normal file
5
apps/dashboard/src/EmptyState.tsx
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import type { ReactNode } from 'react';
|
||||||
|
|
||||||
|
export function EmptyState({ children }: { children: ReactNode }) {
|
||||||
|
return <div className="empty-state">{children}</div>;
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useEffect, useState, type ReactNode } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
DashboardOverview,
|
DashboardOverview,
|
||||||
@@ -7,6 +7,7 @@ import type {
|
|||||||
} from './api';
|
} from './api';
|
||||||
import type { Locale, Messages } from './i18n';
|
import type { Locale, Messages } from './i18n';
|
||||||
import { RoomCardV2, type RoomEntryWithService } from './RoomCardV2';
|
import { RoomCardV2, type RoomEntryWithService } from './RoomCardV2';
|
||||||
|
import { EmptyState } from './EmptyState';
|
||||||
import type { RoomActivityMap } from './useRoomActivity';
|
import type { RoomActivityMap } from './useRoomActivity';
|
||||||
|
|
||||||
type InboxItem = DashboardOverview['inbox'][number];
|
type InboxItem = DashboardOverview['inbox'][number];
|
||||||
@@ -47,10 +48,6 @@ export interface RoomBoardV2Props {
|
|||||||
t: Messages;
|
t: Messages;
|
||||||
}
|
}
|
||||||
|
|
||||||
function EmptyState({ children }: { children: ReactNode }) {
|
|
||||||
return <div className="empty-state">{children}</div>;
|
|
||||||
}
|
|
||||||
|
|
||||||
function roomFilterLabel(
|
function roomFilterLabel(
|
||||||
filter: RoomFilter,
|
filter: RoomFilter,
|
||||||
statusLabel: (status: string, t: Messages) => string,
|
statusLabel: (status: string, t: Messages) => string,
|
||||||
|
|||||||
Reference in New Issue
Block a user