|
|
@ -1,16 +1,16 @@
|
|
|
|
'use client';
|
|
|
|
'use client';
|
|
|
|
|
|
|
|
|
|
|
|
import { Avatar, Icon, Tag } from '@lobehub/ui';
|
|
|
|
import { Avatar, Tag } from '@lobehub/ui';
|
|
|
|
import { Button } from 'antd';
|
|
|
|
import { Button } from 'antd';
|
|
|
|
import { createStyles } from 'antd-style';
|
|
|
|
import { createStyles } from 'antd-style';
|
|
|
|
import { startCase } from 'lodash-es';
|
|
|
|
import { startCase } from 'lodash-es';
|
|
|
|
import { ChevronRight } from 'lucide-react';
|
|
|
|
// import { ChevronRight } from 'lucide-react';
|
|
|
|
import Link from 'next/link';
|
|
|
|
import Link from 'next/link';
|
|
|
|
import qs from 'query-string';
|
|
|
|
// import qs from 'query-string';
|
|
|
|
import { memo } from 'react';
|
|
|
|
import { memo } from 'react';
|
|
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
// import { useTranslation } from 'react-i18next';
|
|
|
|
import { Flexbox } from 'react-layout-kit';
|
|
|
|
import { Flexbox } from 'react-layout-kit';
|
|
|
|
import urlJoin from 'url-join';
|
|
|
|
// import urlJoin from 'url-join';
|
|
|
|
import { useRouter } from 'next/navigation';
|
|
|
|
import { useRouter } from 'next/navigation';
|
|
|
|
import { DiscoverAssistantItem } from '@/types/discover';
|
|
|
|
import { DiscoverAssistantItem } from '@/types/discover';
|
|
|
|
import { useUserStore } from '@/store/user';
|
|
|
|
import { useUserStore } from '@/store/user';
|
|
|
@ -40,11 +40,6 @@ export const useStyles = createStyles(({ css, token }) => ({
|
|
|
|
border-color: rgba(187, 204, 253, 0.24);
|
|
|
|
border-color: rgba(187, 204, 253, 0.24);
|
|
|
|
padding: 20px 50px;
|
|
|
|
padding: 20px 50px;
|
|
|
|
`,
|
|
|
|
`,
|
|
|
|
topBtn: css`
|
|
|
|
|
|
|
|
border-radius: 20px;
|
|
|
|
|
|
|
|
color: #2E62FF;
|
|
|
|
|
|
|
|
border: 1px solid #2E62FF;
|
|
|
|
|
|
|
|
`,
|
|
|
|
|
|
|
|
conTitle: css`
|
|
|
|
conTitle: css`
|
|
|
|
width: 125px;
|
|
|
|
width: 125px;
|
|
|
|
height: 40px;
|
|
|
|
height: 40px;
|
|
|
@ -56,6 +51,11 @@ export const useStyles = createStyles(({ css, token }) => ({
|
|
|
|
opacity: 1;
|
|
|
|
opacity: 1;
|
|
|
|
background: linear-gradient(270deg, #2D65FF 0%, rgba(0, 166, 255, 0.52) 99%);
|
|
|
|
background: linear-gradient(270deg, #2D65FF 0%, rgba(0, 166, 255, 0.52) 99%);
|
|
|
|
`,
|
|
|
|
`,
|
|
|
|
|
|
|
|
topBtn: css`
|
|
|
|
|
|
|
|
border-radius: 20px;
|
|
|
|
|
|
|
|
color: #2E62FF;
|
|
|
|
|
|
|
|
border: 1px solid #2E62FF;
|
|
|
|
|
|
|
|
`,
|
|
|
|
description: css`
|
|
|
|
description: css`
|
|
|
|
padding: 0 45px;
|
|
|
|
padding: 0 45px;
|
|
|
|
margin-top: 10px;
|
|
|
|
margin-top: 10px;
|
|
|
@ -71,19 +71,18 @@ interface HeaderProps {
|
|
|
|
identifier: string;
|
|
|
|
identifier: string;
|
|
|
|
mobile?: boolean;
|
|
|
|
mobile?: boolean;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const getUserId = (s) => s.user?.id
|
|
|
|
const Header = memo<HeaderProps>(({ identifier, data, mobile }) => {
|
|
|
|
const Header = memo<HeaderProps>(({ identifier, data, mobile }) => {
|
|
|
|
const { styles, theme } = useStyles();
|
|
|
|
const { styles, theme } = useStyles();
|
|
|
|
const router = useRouter()
|
|
|
|
const router = useRouter()
|
|
|
|
const { t } = useTranslation('discover');
|
|
|
|
// const { t } = useTranslation('discover');
|
|
|
|
const getUserId = (s: UserStore) => s.user?.id
|
|
|
|
|
|
|
|
const userId = getUserId(useUserStore.getState())
|
|
|
|
const userId = getUserId(useUserStore.getState())
|
|
|
|
const handleBack = () => {
|
|
|
|
const handleBack = () => {
|
|
|
|
router.push('/discover/assistants?userid=' + userId)
|
|
|
|
router.push('/discover/assistants?userid=' + userId)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Flexbox gap={12} width={'100%'}>
|
|
|
|
<Flexbox gap={12} width={'100%'}>
|
|
|
|
<Flexbox align={'center'} gap={8} horizontal justify={'space-between'} width={'100%'} className={styles.top}>
|
|
|
|
<Flexbox align={'center'} className={styles.top} gap={8} horizontal justify={'space-between'} width={'100%'}>
|
|
|
|
<Flexbox align={'center'} gap={16} horizontal justify={'flex-start'}>
|
|
|
|
<Flexbox align={'center'} gap={16} horizontal justify={'flex-start'}>
|
|
|
|
<Avatar
|
|
|
|
<Avatar
|
|
|
|
alt={identifier}
|
|
|
|
alt={identifier}
|
|
|
|