mirror of
https://github.com/grafana/grafana.git
synced 2024-11-22 17:06:57 -06:00
Call ora instead of instantiating it
This commit is contained in:
parent
6a34eb2d9a
commit
40916a552f
@ -4,7 +4,7 @@ type FnToSpin<T> = (options: T) => Promise<void>;
|
||||
|
||||
export const useSpinner = <T>(spinnerLabel: string, fn: FnToSpin<T>, killProcess = true) => {
|
||||
return async (options: T) => {
|
||||
const spinner = new ora(spinnerLabel);
|
||||
const spinner = ora(spinnerLabel);
|
||||
spinner.start();
|
||||
try {
|
||||
await fn(options);
|
||||
|
Loading…
Reference in New Issue
Block a user