diff --git a/server/routes.js b/server/routes.js index 0e1304ad4..6aa8b7c61 100644 --- a/server/routes.js +++ b/server/routes.js @@ -62,7 +62,7 @@ router.route('/meetups/:slug?').get((req, res) => { return renderAndCache({ req, res, path: '/meetups' }) }) -// 酷导游 +// 酷导航 router.route('/cool-guide/:slug?').get((req, res) => { return renderAndCache({ req, res, path: '/cool-guide' }) }) diff --git a/src/components/Header/DesktopView/WorksLayout.tsx b/src/components/Header/DesktopView/NormalLayout.tsx similarity index 89% rename from src/components/Header/DesktopView/WorksLayout.tsx rename to src/components/Header/DesktopView/NormalLayout.tsx index 880edbc2e..ac83e6f45 100644 --- a/src/components/Header/DesktopView/WorksLayout.tsx +++ b/src/components/Header/DesktopView/NormalLayout.tsx @@ -19,7 +19,7 @@ import { Wrapper, InnerWrapper, RouterWrapper, -} from '../styles/desktop_view/works_layout' +} from '../styles/desktop_view/normal_layout' /* eslint-disable-next-line */ const log = buildLog('C:Header') @@ -40,7 +40,7 @@ const hasNoBorder = (metric: TMetric): boolean => METRIC.HELP_CENTER, ]) -const WorksHeader: FC = ({ metric, c11n, community }) => { +const NormalHeader: FC = ({ metric, c11n, community }) => { return ( = ({ metric, c11n, community }) => { ) } -export default WorksHeader +export default NormalHeader diff --git a/src/components/Header/DesktopView/index.tsx b/src/components/Header/DesktopView/index.tsx index 307c348b2..c4094e2d1 100644 --- a/src/components/Header/DesktopView/index.tsx +++ b/src/components/Header/DesktopView/index.tsx @@ -5,7 +5,7 @@ import { METRIC } from '@/constant' import type { TProps } from '../index' import CommunityLayout from './CommunityLayout' import ArticleLayout from './ArticleLayout' -import WorksLayout from './WorksLayout' +import NormalLayout from './NormalLayout' // import ArticleEditorView from './ArticleEditorView' const DesktopView: FC = (props) => { @@ -17,14 +17,11 @@ const DesktopView: FC = (props) => { case METRIC.WORKS_ARTICLE: { return } - case METRIC.WORKS: { - return + case METRIC.COMMUNITY: { + return } - // case METRIC.ARTICLE_EDITOR: { - // return - // } default: { - return + return } } } diff --git a/src/components/Header/styles/desktop_view/works_layout.ts b/src/components/Header/styles/desktop_view/normal_layout.ts similarity index 100% rename from src/components/Header/styles/desktop_view/works_layout.ts rename to src/components/Header/styles/desktop_view/normal_layout.ts diff --git a/src/components/Navigator/MainEntries/DesktopView.tsx b/src/components/Navigator/MainEntries/DesktopView.tsx index 6f572e458..378af14b1 100644 --- a/src/components/Navigator/MainEntries/DesktopView.tsx +++ b/src/components/Navigator/MainEntries/DesktopView.tsx @@ -42,7 +42,7 @@ const DesktopView: FC = ({ type }) => { active={mainPath === ROUTE.COOL_GUIDE} testid={`header-${ROUTE.COOL_GUIDE}`} > - 酷导游 + 酷导航 diff --git a/src/components/Navigator/MorePanel/MobileView.tsx b/src/components/Navigator/MorePanel/MobileView.tsx index e80930834..0b09ce2ed 100644 --- a/src/components/Navigator/MorePanel/MobileView.tsx +++ b/src/components/Navigator/MorePanel/MobileView.tsx @@ -25,7 +25,7 @@ const items = [ }, { icon: `${ICON}/route/cool-guide.svg`, - title: '酷导游', + title: '酷导航', desc: '发现有意思的东西', href: `/${ROUTE.DISCOVERY}`, raw: 12, diff --git a/src/containers/content/CoolGuideContent/FilterBar.tsx b/src/containers/content/CoolGuideContent/FilterBar.tsx index 9ee98f27f..409d07bd9 100644 --- a/src/containers/content/CoolGuideContent/FilterBar.tsx +++ b/src/containers/content/CoolGuideContent/FilterBar.tsx @@ -29,7 +29,7 @@ const FilterBar: FC = ({ topFilter, menuOnSelect }) => { diff --git a/src/containers/content/CoolGuideContent/index.tsx b/src/containers/content/CoolGuideContent/index.tsx index 6401ca6b3..d874de07d 100755 --- a/src/containers/content/CoolGuideContent/index.tsx +++ b/src/containers/content/CoolGuideContent/index.tsx @@ -6,7 +6,9 @@ import { FC } from 'react' +import { METRIC } from '@/constant' import type { TMetric } from '@/spec' + import { buildLog } from '@/utils/logger' import { pluggedIn } from '@/utils/mobx' @@ -21,14 +23,14 @@ import { useInit, menuOnSelect } from './logic' const log = buildLog('C:CoolGuideContent') type TProps = { - coolGuideContent: TStore - metric: TMetric + coolGuideContent?: TStore + metric?: TMetric testid?: string } const CoolGuideContentContainer: FC = ({ coolGuideContent: store, - metric, + metric = METRIC.COOL_GUIDE, testid = 'cool-guide-content', }) => { useInit(store) diff --git a/src/containers/content/RecipesContent/Footer/index.js b/src/containers/content/RecipesContent/Footer/index.js index 81542bf10..92c9da8dc 100644 --- a/src/containers/content/RecipesContent/Footer/index.js +++ b/src/containers/content/RecipesContent/Footer/index.js @@ -24,7 +24,7 @@ const Footer = () => { return ( - 关于酷导游 + 关于酷导航 共收录信息 3485 条,最后更新:3小时前 参与贡献 diff --git a/src/containers/content/TrendingContent/Footer/index.js b/src/containers/content/TrendingContent/Footer/index.js index 81542bf10..92c9da8dc 100755 --- a/src/containers/content/TrendingContent/Footer/index.js +++ b/src/containers/content/TrendingContent/Footer/index.js @@ -24,7 +24,7 @@ const Footer = () => { return ( - 关于酷导游 + 关于酷导航 共收录信息 3485 条,最后更新:3小时前 参与贡献 diff --git a/src/pages/cool-guide.js b/src/pages/cool-guide.tsx similarity index 95% rename from src/pages/cool-guide.js rename to src/pages/cool-guide.tsx index 3f79de7fe..ca658bc46 100755 --- a/src/pages/cool-guide.js +++ b/src/pages/cool-guide.tsx @@ -13,7 +13,7 @@ import CoolGuideContent from '@/containers/content/CoolGuideContent' import { useStore } from '@/stores/init' -const fetchData = async (props, opt) => { +const fetchData = async (props, opt = {}) => { const { realname } = merge({ realname: true }, opt) const token = realname ? getJwtToken(props) : null @@ -65,7 +65,7 @@ const CoolGuidePage = (props) => { const seoConfig = { url: `${SITE_URL}/${ROUTE.COOL_GUIDE}`, - title: '酷导游 | coderplanets', + title: '酷导航 | coderplanets', description: 'IT导航界的特斯拉', }