Skip to content

Commit

Permalink
chore(vercel): fix landing switch
Browse files Browse the repository at this point in the history
  • Loading branch information
mydearxym committed Mar 7, 2024
1 parent 8d444a0 commit b6ea564
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/Landing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import useMetric from '@/hooks/useMetric'
import { ROUTE } from '@/constant/route'

import LavaLampLoading from '@/widgets/Loading/LavaLampLoading'
import { DesktopOnly, MobileOnly, LinkAble } from '@/widgets/Common'
import { DesktopOnly, LinkAble } from '@/widgets/Common'
import Tooltip from '@/widgets/Tooltip'
import FaqList from '@/widgets/FaqList'
import HomeHeader from '@/widgets/HomeHeader'
Expand Down
2 changes: 1 addition & 1 deletion src/app/providers/RootStoreProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const RootStoreWrapper: FC<TProps> = ({ children }) => {
const filterSearchParams = useFilterSearchParams()

// NOTE: 目前在没有启动后端的情况下,如果这行代码出现在 useCommunity 之前,会导致 build 后的代码疯狂
// post 到 /GraphiQL, 奇怪的行为。。
// post 到 /GraphiQL, 奇怪的行为。。,很怀疑是 URQL 客户端的 Bug ..
const theme = useThemeFromURL()

const store = useStore({
Expand Down
4 changes: 3 additions & 1 deletion src/hooks/useMetric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import { useContext } from 'react'
import { MobXProviderContext } from 'mobx-react'

import { usePathname } from 'next/navigation'
import { includes } from 'ramda'

import type { TMetric } from '@/spec'
import METRIC from '@/constant/metric'
import { BANNER_LAYOUT } from '@/constant/layout'
import { ROUTE } from '@/constant/route'

/**
* NOTE: should use observer to wrap the component who use this hook
Expand All @@ -19,7 +21,7 @@ const useMetric = (): TMetric => {

const pathname = usePathname()

if (pathname === '/') {
if (includes(pathname, ['/', `/${ROUTE.PRICE}`, `/${ROUTE.BOOK_DEMO}`])) {
return METRIC.HOME
}

Expand Down

0 comments on commit b6ea564

Please sign in to comment.