- Translate LoadingState and EmptyState components (common namespace) - Translate Header navigation labels (navigation namespace) - Translate StatusBadge trade status labels (exchange namespace) - Create navigation.json translation files for es, en, ca - Create exchange.json translation files for status/direction/transfer labels - Update IntlProvider to load navigation and exchange namespaces - Update frontend tests to expect Spanish translations (default language) - Configure Playwright to use English language for e2e tests via storageState - Fix test expectations to match translated strings All frontend and e2e tests passing.
24 lines
626 B
TypeScript
24 lines
626 B
TypeScript
"use client";
|
|
|
|
import { layoutStyles } from "../styles/shared";
|
|
import { useTranslation } from "../hooks/useTranslation";
|
|
|
|
interface LoadingStateProps {
|
|
/** Custom loading message (default: uses translation) */
|
|
message?: string;
|
|
}
|
|
|
|
/**
|
|
* Standard loading state component.
|
|
* Displays a centered loading message with consistent styling.
|
|
*/
|
|
export function LoadingState({ message }: LoadingStateProps) {
|
|
const t = useTranslation("common");
|
|
const displayMessage = message || t("loading");
|
|
|
|
return (
|
|
<main style={layoutStyles.main}>
|
|
<div style={layoutStyles.loader}>{displayMessage}</div>
|
|
</main>
|
|
);
|
|
}
|