Skip to content

Commit

Permalink
Fix issue with anchor requiring HREF
Browse files Browse the repository at this point in the history
  • Loading branch information
devcshort committed Jan 29, 2024
1 parent 09c2ee5 commit 8de2adc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/client/components/atoms/Anchor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import Link, { LinkProps } from 'next/link';
export function Anchor({
children,
...rest
}: AnchorProps & LinkProps & { target?: string; rel?: string }) {
}: AnchorProps &
LinkProps & { target?: string; rel?: string; href?: string | null }) {
const handleLink = (e: any) => {
createLinkEvent(e);
};
Expand Down
6 changes: 4 additions & 2 deletions packages/client/components/organisms/AppFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ export function AppFooter(props: Props) {
</Anchor>

{appConfig.menus.footer.map(
(el: { name: string; href: string }) => (
(el: { name: string; href: string | null }) => (
<Fragment key={el.name}>
<IconPointFilled size={theme.fontSizes.sm} />
<Anchor
href={el.href}
{...(el.href != null
? { href: el.href }
: { href: '' })}
display="flex"
sx={{ alignItems: 'center' }}
>
Expand Down

0 comments on commit 8de2adc

Please sign in to comment.