Skip to content
Snippets Groups Projects
Commit 1b476b6c authored by Atte Keinänen's avatar Atte Keinänen
Browse files

Update dashboard url method signature [ci e2e]

parent d27982ce
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ export default class AddToDashSelectDashModal extends Component {
addToDashboard = (dashboard: Dashboard) => {
// we send the user over to the chosen dashboard in edit mode with the current card added
this.props.onChangeLocation(Urls.dashboardWithAddCard(dashboard.id, this.props.card.id));
this.props.onChangeLocation(Urls.dashboard(dashboard.id, {addCardWithId: this.props.card.id}));
}
createDashboard = async(newDashboard: Dashboard) => {
......
......@@ -23,12 +23,10 @@ export function question(cardId, hash = "", query = "") {
: `/question${query}${hash}`;
}
export function dashboard(dashboardId) {
return `/dashboard/${dashboardId}`;
}
export function dashboardWithAddCard(dashboardId, cardId) {
return `/dashboard/${dashboardId}#add=${cardId}`;
export function dashboard(dashboardId, {addCardWithId} = {}) {
return addCardWithId != null
? `/dashboard/${dashboardId}#add=${addCardWithId}`
: `/dashboard/${dashboardId}`;
}
export function modelToUrl(model, modelId) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment