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} />,
|
h5: (props: {}) => <Typography component="h5" variant="h6" {...props} />,
|
||||||
h6: (props: {}) => <Typography variant="h6" {...props} />,
|
h6: (props: {}) => <Typography variant="h6" {...props} />,
|
||||||
a: ({ href, ...props }: { href: string }) => {
|
a: ({ href, ...props }: { href: string }) => {
|
||||||
const url = isValidURL(href)
|
const url = `${process.env.NEXT_BASE_PATH}${href}`;
|
||||||
? href
|
return isValidURL(href) ? (
|
||||||
: `${process.env.NEXT_BASE_PATH}${href}`;
|
<MuiLink variant="body1" color="secondary" href={href} {...props} />
|
||||||
|
) : (
|
||||||
return (
|
<Link href={href} as={url}>
|
||||||
<Link prefetch href={href} as={url}>
|
|
||||||
<MuiLink variant="body1" color="secondary" href={url} {...props} />
|
<MuiLink variant="body1" color="secondary" href={url} {...props} />
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue