Skip to content

Commit 394292c

Browse files
committed
move mock dashboard bridge to storybook area
1 parent 4ebe72c commit 394292c

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.storybook/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export * from './telemetryDecorator';
2-
export * from './DynamicTelemetrySelector';
2+
export * from './DynamicTelemetrySelector';
3+
export * from './mockDashboardBridge';

src/frontend/components/Settings/__mocks__/mockBridge.ts renamed to .storybook/mockDashboardBridge.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { DashboardBridge } from '@irdashies/types';
2-
import { defaultDashboard } from '../../../../app/storage/defaultDashboard';
2+
import { defaultDashboard } from '../src/app/storage/defaultDashboard';
33

4-
// TODO find a better home for this
54
export const mockDashboardBridge: DashboardBridge = {
65
reloadDashboard: () => {
76
// noop

.storybook/telemetryDecorator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Decorator } from '@storybook/react';
22
import { DashboardProvider, SessionProvider, TelemetryProvider } from '@irdashies/context';
33
import { generateMockDataFromPath } from '../src/app/bridge/iracingSdk/mock-data/generateMockData';
4-
import { mockDashboardBridge } from '../src/frontend/components/Settings/__mocks__/mockBridge';
4+
import { mockDashboardBridge } from './mockDashboardBridge';
55

66
// eslint-disable-next-line react/display-name
77
export const TelemetryDecorator: (path?: string) => Decorator = (path) => (Story) => (

src/frontend/components/Settings/SettingsLayout.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Meta, StoryObj } from '@storybook/react';
22
import { MemoryRouter, Route, Routes } from 'react-router-dom';
33
import { DashboardProvider } from '@irdashies/context';
44
import { SettingsLayout } from './SettingsLayout';
5-
import { mockDashboardBridge } from './__mocks__/mockBridge';
5+
import { mockDashboardBridge } from '@irdashies/storybook';
66

77
interface StoryProps {
88
initialPath: string;

0 commit comments

Comments
 (0)