Skip to content

Commit e5f723f

Browse files
committed
Update rendering logic for VersionSelector in Content component
- Modify the rendering condition to display either the cached VersionSelector component or a new instance based on availability. - Enhance clarity in the code by improving comments related to component rendering.
1 parent ba86b3b commit e5f723f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

xp-archive/client/content/Content.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,10 @@ export const Content = () => {
146146
{getVersionDisplay()}
147147
</Button>
148148

149-
{/* Use the cached component if available */}
150-
{versionSelectorCache.component || (
149+
{/* Render either the cached component or a new VersionSelector */}
150+
{versionSelectorCache.component ? (
151+
versionSelectorCache.component
152+
) : (
151153
<VersionSelector
152154
versions={
153155
versionSelectorCache.versions.length > 0

0 commit comments

Comments
 (0)