diff --git a/ui/src/components/Operate/index.tsx b/ui/src/components/Operate/index.tsx index d322b9d1..972b0501 100644 --- a/ui/src/components/Operate/index.tsx +++ b/ui/src/components/Operate/index.tsx @@ -23,7 +23,6 @@ interface IProps { qid: string; aid?: string; title: string; - slugTitle: string; hasAnswer?: boolean; isAccepted: boolean; callback: (type: string) => void; @@ -34,7 +33,6 @@ const Index: FC = ({ qid, aid = '', title, - slugTitle, isAccepted = false, hasAnswer = false, memberActions = [], @@ -268,13 +266,7 @@ const Index: FC = ({ return (
- + {firstAction?.map((item) => { if (item.action === 'edit') { return ( diff --git a/ui/src/components/Share/index.tsx b/ui/src/components/Share/index.tsx index dcab12fe..e9f739ce 100644 --- a/ui/src/components/Share/index.tsx +++ b/ui/src/components/Share/index.tsx @@ -6,17 +6,16 @@ import { FacebookShareButton, TwitterShareButton } from 'next-share'; import copy from 'copy-to-clipboard'; import { loggedUserInfoStore } from '@/stores'; -import { pathFactory } from '@/router/pathFactory'; interface IProps { type: 'answer' | 'question'; qid: any; aid?: any; title: string; - slugTitle: string; + // slugTitle: string; } -const Index: FC = ({ type, qid, aid, title, slugTitle = '' }) => { +const Index: FC = ({ type, qid, aid, title }) => { const user = loggedUserInfoStore((state) => state.user); const [show, setShow] = useState(false); const [showTip, setShowTip] = useState(false); @@ -24,15 +23,8 @@ const Index: FC = ({ type, qid, aid, title, slugTitle = '' }) => { const { t } = useTranslation(); let baseUrl = type === 'question' - ? `${window.location.origin}${pathFactory.questionLanding( - qid, - slugTitle, - )}` - : `${window.location.origin}${pathFactory.answerLanding({ - questionId: qid, - slugTitle, - answerId: aid, - })}`; + ? `${window.location.origin}/questions/${qid}` + : `${window.location.origin}/questions/${qid}/${aid}`; if (user.id) { baseUrl = `${baseUrl}?shareUserId=${user.username}`; } diff --git a/ui/src/components/UserCard/index.tsx b/ui/src/components/UserCard/index.tsx index b27abe33..26de5201 100644 --- a/ui/src/components/UserCard/index.tsx +++ b/ui/src/components/UserCard/index.tsx @@ -63,9 +63,12 @@ const Index: FC = ({ )}
-
+
{data?.status !== 'deleted' ? ( - + {data?.display_name} ) : ( diff --git a/ui/src/pages/Install/index.tsx b/ui/src/pages/Install/index.tsx index 0f78e23c..4262e135 100644 --- a/ui/src/pages/Install/index.tsx +++ b/ui/src/pages/Install/index.tsx @@ -23,7 +23,7 @@ import { const Index: FC = () => { const { t } = useTranslation('translation', { keyPrefix: 'install' }); - const [step, setStep] = useState(4); + const [step, setStep] = useState(1); const [loading, setLoading] = useState(true); const [errorData, setErrorData] = useState<{ [propName: string]: any }>({ msg: '', diff --git a/ui/src/pages/Questions/Detail/components/Answer/index.tsx b/ui/src/pages/Questions/Detail/components/Answer/index.tsx index 26777cbb..9ad324ea 100644 --- a/ui/src/pages/Questions/Detail/components/Answer/index.tsx +++ b/ui/src/pages/Questions/Detail/components/Answer/index.tsx @@ -23,7 +23,6 @@ interface Props { aid?: string; canAccept: boolean; questionTitle: string; - slugTitle: string; isLogged: boolean; callback: (type: string) => void; } @@ -32,7 +31,6 @@ const Index: FC = ({ data, isLogged, questionTitle = '', - slugTitle, callback, canAccept = false, }) => { @@ -132,7 +130,6 @@ const Index: FC = ({ type="answer" isAccepted={data.accepted === 2} title={questionTitle} - slugTitle={slugTitle} callback={callback} />
diff --git a/ui/src/pages/Questions/Detail/components/Question/index.tsx b/ui/src/pages/Questions/Detail/components/Question/index.tsx index 0f1c3d04..22042919 100644 --- a/ui/src/pages/Questions/Detail/components/Question/index.tsx +++ b/ui/src/pages/Questions/Detail/components/Question/index.tsx @@ -148,7 +148,6 @@ const Index: FC = ({ data, initPage, hasAnswer, isLogged }) => { type="question" memberActions={data?.member_actions} title={data.title} - slugTitle={data.url_title} hasAnswer={hasAnswer} isAccepted={Boolean(data?.accepted_answer_id)} callback={initPage} diff --git a/ui/src/pages/Questions/Detail/index.tsx b/ui/src/pages/Questions/Detail/index.tsx index c625b0ce..317454df 100644 --- a/ui/src/pages/Questions/Detail/index.tsx +++ b/ui/src/pages/Questions/Detail/index.tsx @@ -234,7 +234,6 @@ const Index = () => { key={item?.id} data={item} questionTitle={question?.title || ''} - slugTitle={question?.url_title} canAccept={isAuthor || isAdmin || isModerator} callback={initPage} isLogged={isLogged} diff --git a/ui/src/plugins/builtin/Algolia/info.yaml b/ui/src/plugins/builtin/Algolia/info.yaml index 1485558c..5d6038b5 100644 --- a/ui/src/plugins/builtin/Algolia/info.yaml +++ b/ui/src/plugins/builtin/Algolia/info.yaml @@ -1,4 +1,3 @@ slug_name: algolia version: 0.0.1 -link: https://github.com/answerdev/plugins/tree/main/connector/ author: Answer.dev