mirror of
https://github.com/gnmyt/LicenseAPI.git
synced 2026-01-09 17:51:47 +00:00
Fix bug in LicenseDialog.jsx
This commit is contained in:
@ -100,9 +100,15 @@ export const LicenseDialog = ({open, onClose, switchToEnd, editLicense, setEditL
|
||||
}
|
||||
}
|
||||
|
||||
const upperCaseFirstLetter = (string) => {
|
||||
return string.charAt(0).toUpperCase() + string.slice(1);
|
||||
}
|
||||
|
||||
return (
|
||||
<Dialog open={open} onClose={closeDialog}>
|
||||
<DialogTitle>{editLicense ? "Edit" : "Create"} license {currentPage !== "chooser" && <>» {currentPage}</>}</DialogTitle>
|
||||
<DialogTitle onClick={() => setCurrentPage("chooser")} sx={{cursor: currentPage !== "chooser"
|
||||
? "pointer" : "default"}}>{editLicense ? "Edit" : "Create"} license {currentPage !== "chooser" &&
|
||||
<>› {upperCaseFirstLetter(currentPage)}</>}</DialogTitle>
|
||||
<DialogContent sx={{width: 400, overflow: "hidden"}}>
|
||||
<TransitionWrapper direction="right" in={currentPage === "chooser"}>
|
||||
<Stack gap={1}>
|
||||
|
||||
Reference in New Issue
Block a user