mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge remote-tracking branch 'grafana/master' into reusable-formatting-options
* grafana/master: Call ora instead of instantiating it
This commit is contained in:
commit
df8fc3f7cb
@ -4,7 +4,7 @@ type FnToSpin<T> = (options: T) => Promise<void>;
|
|||||||
|
|
||||||
export const useSpinner = <T>(spinnerLabel: string, fn: FnToSpin<T>, killProcess = true) => {
|
export const useSpinner = <T>(spinnerLabel: string, fn: FnToSpin<T>, killProcess = true) => {
|
||||||
return async (options: T) => {
|
return async (options: T) => {
|
||||||
const spinner = new ora(spinnerLabel);
|
const spinner = ora(spinnerLabel);
|
||||||
spinner.start();
|
spinner.start();
|
||||||
try {
|
try {
|
||||||
await fn(options);
|
await fn(options);
|
||||||
|
Loading…
Reference in New Issue
Block a user