Fixed url of back button in datasource edit page, when root_url configured (#15759)

* Fixed url of back button in datasource edit page, when root_url configured

* Update snapshots

* Use app config directly in ButtonRow instead of passing datasources page URL via prop

* Snapshots update
This commit is contained in:
Dominik Prokop
2019-03-05 07:35:45 +01:00
committed by GitHub
parent 1e52a1f9a5
commit cee5f030dc
@@ -1,4 +1,5 @@
import React, { FC } from 'react';
import config from 'app/core/config';
export interface Props {
isReadOnly: boolean;
@@ -23,7 +24,7 @@ const ButtonRow: FC<Props> = ({ isReadOnly, onDelete, onSubmit, onTest }) => {
<button type="submit" className="btn btn-danger" disabled={isReadOnly} onClick={onDelete}>
Delete
</button>
<a className="btn btn-inverse" href="/datasources">
<a className="btn btn-inverse" href={`${config.appSubUrl}/datasources`}>
Back
</a>
</div>