Skip to content

Commit

Permalink
getting started tweaks (#835)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelquigley committed Feb 6, 2025
1 parent ab9a4fe commit cf73280
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ui/src/GettingStartedModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {modalStyle} from "./styling/theme.ts";
import {Box, Grid2, Modal, Typography} from "@mui/material";
import ClipboardText from "./ClipboardText.tsx";
import useApiConsoleStore from "./model/store.ts";
import {useEffect} from "react";

interface GettingStartedModalProps {
close: () => void;
Expand All @@ -10,6 +11,13 @@ interface GettingStartedModalProps {

const GettingStartedModal = ({ close, isOpen }: GettingStartedModalProps) => {
const user = useApiConsoleStore(store => store.user);
const nodes = useApiConsoleStore(store => store.nodes);

useEffect(() => {
if(nodes && nodes.length > 1) {
close();
}
}, [nodes]);

return (
<Modal open={isOpen} onClose={close}>
Expand All @@ -29,7 +37,7 @@ const GettingStartedModal = ({ close, isOpen }: GettingStartedModalProps) => {
</Grid2>
<Grid2 container sx={{ flexGrow: 1, p: 1 }} alignItems="center">
<Typography>
<a href="https://github.com/openziti/zrok/releases">https://github.com/openziti/zrok/releases</a>
<a href="https://github.com/openziti/zrok/releases" target="_">https://github.com/openziti/zrok/releases</a>
</Typography>
</Grid2>
<Grid2 container sx={{ flexGrow: 1, p: 1 }} alignItems="center">
Expand Down Expand Up @@ -80,7 +88,7 @@ const GettingStartedModal = ({ close, isOpen }: GettingStartedModalProps) => {
<Grid2 container sx={{ flexGrow: 1, p: 1 }} alignItems="center">
<Typography>
Visit the <a href="https://docs.zrok.io/docs/getting-started" target="_">Getting Started Guide</a>
<span> </span>in the <a href="https://docs.zrok.io" target="_">zrok Documentation</a> for more help.
<span> </span>and the <a href="https://docs.zrok.io" target="_">zrok Documentation</a> for more help.
</Typography>
</Grid2>
</Box>
Expand Down

0 comments on commit cf73280

Please sign in to comment.