Skip to content

Commit

Permalink
fix - display full permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangohjw committed Nov 15, 2024
1 parent 995d73c commit 37021b4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface ResourceSelectorProps {
onlyShowFolders?: boolean
}

const generatePermalinkPrefix = (parents: PendingMoveResource[]) => {
const generatePermalink = (parents: PendingMoveResource[]) => {
return parents.map((parent) => parent.permalink).join("/")
}

Expand Down Expand Up @@ -208,12 +208,12 @@ const SuspensableResourceSelector = ({
<Box bg="utility.feedback.info-subtle" p="0.75rem" w="full">
<Flex flexDirection="column" gap="0.25rem">
<Text textStyle="caption-1">
You selected /{moveDest.permalink}
You selected {generatePermalink(resourceStack)}
</Text>
{existingResource && (
<Text textStyle="caption-2">
The URL for {existingResource.title} will change to{" "}
{`${generatePermalinkPrefix(resourceStack)}/${existingResource.permalink}`}
{`${generatePermalink(resourceStack)}/${existingResource.permalink}`}
</Text>
)}
</Flex>
Expand Down

0 comments on commit 37021b4

Please sign in to comment.