Skip to content

Commit

Permalink
fix: copy changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderleegs committed Sep 6, 2023
1 parent eec7c25 commit e267028
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/layouts/EditNavBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ const EditNavBar = ({ match }) => {
<Editable.DraggableAccordionItem
index={linkIndex}
tag={
<Tag variant="subtle">Menu Group</Tag>
<Tag variant="subtle">Menu group</Tag>
}
title={link.title}
isInvalid={
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/components/NavBar/FolderMenuBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const FolderMenuBody = ({
return (
<Editable.Section>
<FormControl isRequired isInvalid={!!errors.title}>
<FormLabel>Menu Item Name</FormLabel>
<FormLabel>Menu item name</FormLabel>
<Input
placeholder="This is displayed on the navigation bar"
id={`link-${index}-title`}
Expand Down
8 changes: 4 additions & 4 deletions src/layouts/components/NavBar/GroupMenuBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const GroupMenuBody = ({
return (
<Editable.Section>
<FormControl isRequired isInvalid={!!errors.title}>
<FormLabel>Menu Group Name</FormLabel>
<FormLabel>Menu group name</FormLabel>
<Input
placeholder="This is displayed on the navigation bar"
id={`link-${index}-title`}
Expand All @@ -52,7 +52,7 @@ export const GroupMenuBody = ({
<FormControl isRequired isInvalid={!!errors.url}>
<FormLabel>Destination</FormLabel>
<Input
placeholder="/permalink"
placeholder="Enter a /page-url or link for this menu item"
id={`link-${index}-url`}
value={url}
onChange={onChange}
Expand Down Expand Up @@ -89,7 +89,7 @@ export const GroupMenuBody = ({
isRequired
isInvalid={!!errors.sublinks[sublinkIndex].title}
>
<FormLabel>Submenu Name</FormLabel>
<FormLabel>Submenu name</FormLabel>
<Input
placeholder="New menu group"
id={`sublink-${index}-${sublinkIndex}-title`}
Expand All @@ -106,7 +106,7 @@ export const GroupMenuBody = ({
>
<FormLabel>Destination</FormLabel>
<Input
placeholder="/permalink"
placeholder="Enter a /page-url or link for this menu item"
id={`sublink-${index}-${sublinkIndex}-url`}
value={sublink.url}
onChange={onChange}
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/components/NavBar/PageMenuBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const PageMenuBody = ({ title, url, index, errors }: PagesBodyProps) => {
return (
<Editable.Section>
<FormControl isRequired isInvalid={!!errors.title}>
<FormLabel>Menu Item Name</FormLabel>
<FormLabel>Menu item name</FormLabel>
<Input
placeholder="This is displayed on the navigation bar"
id={`link-${index}-title`}
Expand All @@ -38,7 +38,7 @@ export const PageMenuBody = ({ title, url, index, errors }: PagesBodyProps) => {
<FormControl isRequired isInvalid={!!errors.url}>
<FormLabel>Destination</FormLabel>
<Input
placeholder="/permalink"
placeholder="Enter a /page-url or link for this menu item"
id={`link-${index}-url`}
value={url}
onChange={onChange}
Expand Down
6 changes: 3 additions & 3 deletions src/utils/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -677,15 +677,15 @@ const validateLink = (linkType, value) => {
switch (linkType) {
case "title":
if (value.length < LINK_TITLE_MIN_LENGTH) {
errorMessage = `Title cannot be empty`
errorMessage = `Name cannot be empty`
}
if (value.length > LINK_TITLE_MAX_LENGTH) {
errorMessage = `Title should be shorter than ${LINK_TITLE_MAX_LENGTH} characters`
errorMessage = `Name should be shorter than ${LINK_TITLE_MAX_LENGTH} characters`
}
break
case "url":
if (value.length < LINK_URL_MIN_LENGTH) {
errorMessage = `Permalink cannot be empty`
errorMessage = `Destination cannot be empty`
}
break
default:
Expand Down

0 comments on commit e267028

Please sign in to comment.