fix: Only render API reference if Server is enabled

This commit is contained in:
hiro 2024-01-19 16:13:07 +07:00 committed by hiro
parent 8c23db6388
commit 8e4a875e2f

View File

@ -125,11 +125,13 @@ const LocalServerScreen = () => {
> >
{serverEnabled ? 'Stop' : 'Start'} Server {serverEnabled ? 'Stop' : 'Start'} Server
</Button> </Button>
{serverEnabled && (
<Button block themes="secondaryBlue" asChild> <Button block themes="secondaryBlue" asChild>
<a href={`http://localhost:${port}`} target="_blank"> <a href={`http://localhost:${port}`} target="_blank">
API Reference <ExternalLinkIcon size={20} className="ml-2" /> API Reference <ExternalLinkIcon size={20} className="ml-2" />
</a> </a>
</Button> </Button>
)}
</div> </div>
</div> </div>