Skip to content

Commit

Permalink
fix: www로만 링크를 작성했을 때 라우팅 오류 해결 (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
semnil5202 authored May 5, 2024
1 parent 5b9d477 commit c8f8b9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/components/HyperLinkText/HyperLinkText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ const convertHyperLinkTexts = ({ font, color, lineHeight = 'normal', children: t
<Paragraph as="p" key={`${line}-${idx}`} font={font} color={color} lineHeight={lineHeight}>
{line.split(' ').map((word, idx) => {
const isFirst = idx === 0;
const link = word.startsWith('www') ? `https://${word}` : word;

if (LINK_REG_EXP.test(word)) {
return (
<HyperLink
as="a"
key={`${word}-${idx}`}
href={word}
href={link}
target="_blank"
font={font}
color={color}
Expand Down

0 comments on commit c8f8b9d

Please sign in to comment.