mirror of
https://github.com/kou029w/_.git
synced 2025-02-07 09:38:46 +00:00
use correct href link
This commit is contained in:
parent
2d1f516bd3
commit
27b66b1631
1 changed files with 5 additions and 6 deletions
|
@ -49,12 +49,11 @@ export const components = {
|
|||
h5: (props: {}) => <Typography component="h5" variant="h6" {...props} />,
|
||||
h6: (props: {}) => <Typography variant="h6" {...props} />,
|
||||
a: ({ href, ...props }: { href: string }) => {
|
||||
const url = isValidURL(href)
|
||||
? href
|
||||
: `${process.env.NEXT_BASE_PATH}${href}`;
|
||||
|
||||
return (
|
||||
<Link prefetch href={href} as={url}>
|
||||
const url = `${process.env.NEXT_BASE_PATH}${href}`;
|
||||
return isValidURL(href) ? (
|
||||
<MuiLink variant="body1" color="secondary" href={href} {...props} />
|
||||
) : (
|
||||
<Link href={href} as={url}>
|
||||
<MuiLink variant="body1" color="secondary" href={url} {...props} />
|
||||
</Link>
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue