diff --git a/components/layout/CustomAppBar.jsx b/components/layout/CustomAppBar.jsx
index 8a1fd5f..97d2918 100644
--- a/components/layout/CustomAppBar.jsx
+++ b/components/layout/CustomAppBar.jsx
@@ -1,10 +1,17 @@
import { AppBar, TitlePortal } from 'react-admin';
import YearSelector from './YearSelector';
+// The app's own icon (client/public/icon.svg) before the title; hidden if the app has none.
+const hideOnError = (e) => { e.currentTarget.style.display = 'none'; };
+const AppLogo = () => (
+
+);
+
// content: what the app bar shows next to the title. Defaults to the year picker;
// pass null for nothing, or an app's own control (e.g. a project switcher).
const CustomAppBar = ({ content = , ...props }) => (
+
{content}
diff --git a/components/layout/__tests__/CustomAppBar.test.jsx b/components/layout/__tests__/CustomAppBar.test.jsx
index 7a88356..5f47cc2 100644
--- a/components/layout/__tests__/CustomAppBar.test.jsx
+++ b/components/layout/__tests__/CustomAppBar.test.jsx
@@ -18,6 +18,11 @@ describe('CustomAppBar', () => {
expect(screen.queryByText('year-selector')).not.toBeInTheDocument();
});
+ it('shows the app icon before the title', () => {
+ const { container } = renderBar();
+ expect(container.querySelector('img[src="/icon.svg"]')).toBeInTheDocument();
+ });
+
it('shows nothing next to the title for null content', () => {
renderBar({ content: null });
expect(screen.queryByText('year-selector')).not.toBeInTheDocument();