Show warning if there's uncommitted changes (#92)

This commit is contained in:
Will Chen
2025-05-06 11:07:31 -07:00
committed by GitHub
parent 43ec6a4563
commit c425daf893
8 changed files with 65 additions and 10 deletions

View File

@@ -21,6 +21,15 @@ export const showError = (message: any) => {
console.error(message);
};
/**
* Show a warning toast
* @param message The warning message to display
*/
export const showWarning = (message: string) => {
toast.warning(message);
console.warn(message);
};
/**
* Show an info toast
* @param message The info message to display
@@ -49,5 +58,12 @@ export const showLoading = <T>(
});
};
export const showUncommittedFilesWarning = (files: string[]) => {
showWarning(
`Some changed files were not committed. Please use git to manually commit them.
\n\n${files.join("\n")}`
);
};
// Re-export for direct use
export { toast };