Skip to content

Commit

Permalink
Merge pull request #45 from illacloud/fix/path_error
Browse files Browse the repository at this point in the history
fix: error path
  • Loading branch information
AruSeito authored Jan 3, 2024
2 parents 93500b2 + 6977720 commit 5d0a1d3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/ILLATheme/CommonHeader/Menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { sendTagEvent } from "@site/src/utils/gtag"
import style from "./index.module.css"
import { useUtmParams } from "@site/src/hooks/useUtmParams"
import { Solutions } from "../SolutionsItem"
import { fixedPath } from "@site/src/utils/fixedPath"

export const HeaderMenu: FC<IHeaderMenuProps> = (props) => {
const { whiteTheme, hasBgColor } = props
Expand All @@ -23,7 +24,7 @@ export const HeaderMenu: FC<IHeaderMenuProps> = (props) => {
return (
<Link
key={item.label}
to={getUtmParams(item.href)}
to={getUtmParams(fixedPath(item.href))}
onClick={() => {
sendTagEvent({
action: "click",
Expand Down Expand Up @@ -95,7 +96,7 @@ export const HeaderMenu: FC<IHeaderMenuProps> = (props) => {
}}
>
<Link
to={getUtmParams(subItem.href)}
to={getUtmParams(fixedPath(subItem.href))}
className={clsx(
style.panelItemStyle,
whiteTheme
Expand Down
4 changes: 2 additions & 2 deletions src/components/blog/discord-and-github-banner/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const DiscordAndGithubBanner = () => {
</div>
</div>
<div className="flex flex-col gap-4 w-full md:w-auto">
<Link to={getUtmParams("https://discord.gg/refine")}>
<Link to={getUtmParams("https://discord.gg/illacloud")}>
<button className="w-full md:w-60 h-12 px-8 py-2.5 bg-white rounded-3xl justify-center items-center gap-2.5 inline-flex">
<svg
width="25"
Expand Down Expand Up @@ -50,7 +50,7 @@ const DiscordAndGithubBanner = () => {
</div>
</button>
</Link>
<Link to={getUtmParams("https://discord.gg/refine")}>
<Link to={getUtmParams("https://github.com/illacloud/illa-builder")}>
<button className="w-full md:w-60 h-12 px-8 py-2.5 bg-white bg-opacity-10 rounded-3xl justify-center items-center gap-2.5 inline-flex">
<svg
width="24"
Expand Down
2 changes: 1 addition & 1 deletion src/theme/BlogPostItem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function BlogPostItem({ className }) {
"rounded",
"px-2 py-1",
)}
permalink={tag.fixedPermalink}
permalink={tag.permalink}
key={tag.permalink}
label={tag.label}
/>
Expand Down
3 changes: 2 additions & 1 deletion src/theme/Tag/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import React from "react"
import clsx from "clsx"
import Link from "@docusaurus/Link"
import { useUtmParams } from "@site/src/hooks/useUtmParams"
import { fixedPath } from "@site/src/utils/fixedPath"

export default function Tag({ permalink, label, isActive, className }) {
const getUtmParams = useUtmParams()
return (
<Link
to={getUtmParams(permalink)}
to={getUtmParams(fixedPath(permalink))}
onClick={(e) => console.log("1234")}
className={clsx(
"no-underline hover:no-underline",
Expand Down

0 comments on commit 5d0a1d3

Please sign in to comment.