mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-27 04:43:12 +03:00
Fixed default theme button in theme settings (#18656)
no issue
- the default theme (currently Source) showed Activate despite being
active already, which may lead to confusion.
- This fix checks whether it's already to more accurately display the
wording of the button
---
<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 4fd443c</samp>
Fix theme preview button label for default theme. Hide the activate
button for the default theme if it is already active in
`ThemePreview.tsx`.
This commit is contained in:
parent
7f67e98e28
commit
a562cc7c7f
@ -72,7 +72,7 @@ const ThemePreview: React.FC<{
|
||||
|
||||
if (isInstalling) {
|
||||
installButtonLabel = 'Installing...';
|
||||
} else if (selectedTheme.ref === 'default') {
|
||||
} else if (selectedTheme.ref === 'default' && !installedTheme?.active) {
|
||||
installButtonLabel = `Activate ${selectedTheme.name}`;
|
||||
} else if (installedTheme) {
|
||||
installButtonLabel = `Update ${selectedTheme.name}`;
|
||||
|
Loading…
Reference in New Issue
Block a user