-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix service typing and 'version' colour
- Loading branch information
1 parent
a895d6f
commit 2ec8dad
Showing
4 changed files
with
37 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
import { EPINIO_PRODUCT_NAME } from '../types'; | ||
|
||
export const rootEpinioRoute = () => ({ | ||
import { Location } from 'vue-router'; | ||
type Dictionary<T> = { [key: string]: T } | ||
|
||
export const rootEpinioRoute = (): Location => ({ | ||
name: EPINIO_PRODUCT_NAME, | ||
params: { product: EPINIO_PRODUCT_NAME } | ||
}); | ||
|
||
export const createEpinioRoute = (name: string, params: Object, query?: Object) => ({ | ||
name: `${ rootEpinioRoute().name }-${ name }`, | ||
params: { | ||
...rootEpinioRoute().params, | ||
...params | ||
}, | ||
...query | ||
}); | ||
export const createEpinioRoute = (name: string, params: Dictionary<string>, query?: Object): Location => { | ||
const rootParams = rootEpinioRoute().params || {}; | ||
|
||
return { | ||
name: `${ rootEpinioRoute().name }-${ name }`, | ||
params: { | ||
...rootParams, | ||
...params | ||
}, | ||
...query | ||
}; | ||
}; |