Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update from Testnet to Stable in the dropdown menu #461

Merged
merged 3 commits into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/VersionDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function VersionDropdown({
}) {
const [opened, setOpened] = useState(false);
const [activeVersion, setActiveVersion] = useState<
typeof FUEL_TESTNET_UPPER_CASE | 'Nightly'
typeof FUEL_TESTNET_UPPER_CASE | typeof FUEL_TESTNET | 'Nightly'
>(versionSet === 'default' ? FUEL_TESTNET_UPPER_CASE : 'Nightly');
const router = useRouter();
const setVersion = useSetVersion();
Expand All @@ -41,7 +41,7 @@ export default function VersionDropdown({
opened ? { ...styles.trigger, ...styles.triggerOpen } : styles.trigger
}
>
Version: {activeVersion}
Version: {activeVersion === FUEL_TESTNET_UPPER_CASE ? 'Stable' : activeVersion}
</Dropdown.Trigger>
<Dropdown.Menu
disabledKeys={versionSet === 'default' ? [FUEL_TESTNET] : [versionSet]}
Expand Down Expand Up @@ -74,7 +74,7 @@ export default function VersionDropdown({
key={FUEL_TESTNET}
aria-label={FUEL_TESTNET}
>
<Text>{FUEL_TESTNET_UPPER_CASE}</Text>
<Text>Stable</Text> {/* Display 'Stable' instead of raw version */}
{versionSet === 'default' && <Icon icon='Check' color='accent11' />}
</Dropdown.MenuItem>

Expand Down
Loading