Skip to content

Commit

Permalink
when launching a shuttle the set destination is removed
Browse files Browse the repository at this point in the history
  • Loading branch information
mullenpaul committed Oct 16, 2023
1 parent 9f94b42 commit 93e3a6e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tgui/packages/tgui/interfaces/NavigationShuttle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const CancelLaunchButton = (_, context) => {

export const LaunchButton = (_, context) => {
const { act } = useBackend<NavigationProps>(context);
const [siteselection] = useSharedState<string | undefined>(
const [siteselection, setSiteSelection] = useSharedState<string | undefined>(
context,
'target_site',
undefined
Expand All @@ -50,7 +50,10 @@ export const LaunchButton = (_, context) => {
<Button
icon="rocket"
disabled={siteselection === undefined}
onClick={() => act('move', { target: siteselection })}>
onClick={() => {
act('move', { target: siteselection });
setSiteSelection(undefined);
}}>
Launch
</Button>
);
Expand Down

0 comments on commit 93e3a6e

Please sign in to comment.