-
Notifications
You must be signed in to change notification settings - Fork 118
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
frontend: Adjust workflow layout whitespace #3155
Conversation
@@ -74,11 +81,11 @@ const WorkflowLayout = ({ | |||
children, | |||
}: React.PropsWithChildren<LayoutProps>) => { | |||
const location = useLocation(); | |||
const workflowPaths = workflow.routes.map(({ path }) => `/${workflow.path}/${path}`); | |||
const workflowPaths = workflow?.routes.map(({ path }) => `/${workflow?.path}/${path}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It there is no workflow.path
what would be rendered?, could it do with a fallback or other handling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, because of workflow
possibly being undefined.
I think I'm going to change the type signature to reflect that workflow (and the path property) are required.
@@ -74,11 +81,11 @@ const WorkflowLayout = ({ | |||
children, | |||
}: React.PropsWithChildren<LayoutProps>) => { | |||
const location = useLocation(); | |||
const workflowPaths = workflow.routes.map(({ path }) => `/${workflow.path}/${path}`); | |||
const workflowPaths = workflow?.routes.map(({ path }) => `/${workflow?.path}/${path}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this in case of no workflow?.routes
so workflowPaths
is not left undefined
const workflowPaths = workflow?.routes.map(({ path }) => `/${workflow?.path}/${path}`); | |
const workflowPaths = workflow?.routes.map(({ path }) => `/${workflow?.path}/${path}`) || []; |
Description
Screenshots
Before
After
Testing Performed
Manual