update helpertext and add typography component to display note
This commit is contained in:
1 parent
f2e8f16af8
commit
e7742f9be8
1 file changed
+8
-7
@@ -96,7 +96,7 @@ const Settings = () => {
|
|||||||
setIsApiKeySet(true);
|
setIsApiKeySet(true);
|
||||||
setForm((prev) => ({
|
setForm((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
pagespeedApiKey: "********",
|
pagespeedApiKey: "*************************************",
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
setIsApiKeySet(false);
|
setIsApiKeySet(false);
|
||||||
@@ -332,11 +332,7 @@ const Settings = () => {
|
|||||||
disabled={isApiKeySet}
|
disabled={isApiKeySet}
|
||||||
optionalLabel="(Optional)"
|
optionalLabel="(Optional)"
|
||||||
error={!!errors.pagespeedApiKey}
|
error={!!errors.pagespeedApiKey}
|
||||||
helperText={
|
helperText={errors.pagespeedApiKey}
|
||||||
isApiKeySet
|
|
||||||
? "API key is set. Click Reset to change it."
|
|
||||||
: errors.pagespeedApiKey
|
|
||||||
}
|
|
||||||
endAdornment={
|
endAdornment={
|
||||||
!isApiKeySet && (
|
!isApiKeySet && (
|
||||||
<PasswordEndAdornment
|
<PasswordEndAdornment
|
||||||
@@ -346,9 +342,14 @@ const Settings = () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
{isApiKeySet && (
|
||||||
|
<Typography >
|
||||||
|
API key is set. Click Reset to change it.
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
{isApiKeySet && (
|
{isApiKeySet && (
|
||||||
<Button onClick={handleResetApiKey} variant="outlined">
|
<Button onClick={handleResetApiKey} variant="contained" color="error">
|
||||||
Reset
|
Reset
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in new issue
Block a user