mirror of
https://github.com/gnmyt/LicenseAPI.git
synced 2026-01-10 10:11: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 (
|
return (
|
||||||
<Dialog open={open} onClose={closeDialog}>
|
<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"}}>
|
<DialogContent sx={{width: 400, overflow: "hidden"}}>
|
||||||
<TransitionWrapper direction="right" in={currentPage === "chooser"}>
|
<TransitionWrapper direction="right" in={currentPage === "chooser"}>
|
||||||
<Stack gap={1}>
|
<Stack gap={1}>
|
||||||
|
|||||||
Reference in New Issue
Block a user