Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch-fix/dev-10471-dashboard-stories #1918

Merged
merged 1 commit into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/dashboard/src/CdcDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type MultiDashboardProps = Omit<WCMSProps, 'configUrl'> & {
config?: MultiDashboardConfig
}

const MultiDashboardWrapper: React.FC<MultiDashboardProps> = ({ configUrl, isEditor, isDebug }) => {
const MultiDashboardWrapper: React.FC<MultiDashboardProps> = ({ configUrl, isEditor, isDebug, config }) => {
const [initial, setInitial] = useState<InitialState>(undefined)
const editorContext = useContext(EditorContext)

Expand All @@ -45,7 +45,7 @@ const MultiDashboardWrapper: React.FC<MultiDashboardProps> = ({ configUrl, isEdi
}

const loadConfig = async () => {
const _config: MultiDashboardConfig = editorContext.config || (await (await fetch(configUrl)).json())
const _config: MultiDashboardConfig = config || editorContext.config || (await (await fetch(configUrl)).json())
const selected = getSelectedConfig(_config)

const { newConfig, datasets } =
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/components/ConfigureTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function ConfigureTab({ containerEl }) {
case 'dashboard':
return (
<ErrorBoundary component='CdcDashboard'>
<MultiDashboardWrapper isEditor={true} isDebug={isDebug} config={config} />
<MultiDashboardWrapper isEditor={true} isDebug={isDebug} />
</ErrorBoundary>
)
case 'data-bite':
Expand Down