A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
chore: update component name and fix unnecessary style import
haitao(lj)eb2efc365c91
diff --git a/ui/src/components/Header/index.scss b/ui/src/components/Header/index.scssindex 94e65e17..e47358be 100644--- a/ui/src/components/Header/index.scss+++ b/ui/src/components/Header/index.scss@@ -1,4 +1,5 @@-@import '~bootstrap/scss/bootstrap-utilities';+@import 'bootstrap/scss/functions';+@import 'bootstrap/scss/variables';#header {background: linear-gradient(180deg, #0033FF 0%, rgba(0, 51, 255, 0.95) 100%);--bs-navbar-padding-y: 0.75rem;diff --git a/ui/src/components/Header/index.tsx b/ui/src/components/Header/index.tsxindex 1b453e9b..54d6cee7 100644--- a/ui/src/components/Header/index.tsx+++ b/ui/src/components/Header/index.tsx@@ -56,9 +56,9 @@ const Header: FC = () => {useEffect(() => {const collapse = document.querySelector('#navBarContent');if (collapse && collapse.classList.contains('show')) {- const toogle = document.querySelector('#navBarToggle') as HTMLElement;- if (toogle) {- toogle?.click();+ const toggle = document.querySelector('#navBarToggle') as HTMLElement;+ if (toggle) {+ toggle?.click();}}}, [location.pathname]);diff --git a/ui/src/components/QueryGroup/index.tsx b/ui/src/components/QueryGroup/index.tsxindex 43c08777..fae01621 100644--- a/ui/src/components/QueryGroup/index.tsx+++ b/ui/src/components/QueryGroup/index.tsx@@ -7,7 +7,7 @@ import classNames from 'classnames';interface Props {data;- i18nkeyPrefix: string;+ i18nKeyPrefix: string;currentSort: string;sortKey?: string;className?: string;@@ -17,13 +17,13 @@ const Index: FC<Props> = ({data = [],currentSort = '',sortKey = 'order',- i18nkeyPrefix = '',+ i18nKeyPrefix = '',className = '',}) => {const [searchParams, setUrlSearchParams] = useSearchParams();const { t } = useTranslation('translation', {- keyPrefix: i18nkeyPrefix,+ keyPrefix: i18nKeyPrefix,});const handleParams = (order): string => {diff --git a/ui/src/components/Questions/index.tsx b/ui/src/components/QuestionList/index.tsxsimilarity index 99%rename from ui/src/components/Questions/index.tsxrename to ui/src/components/QuestionList/index.tsxindex 70290606..295b9034 100644--- a/ui/src/components/Questions/index.tsx+++ b/ui/src/components/QuestionList/index.tsx@@ -115,7 +115,7 @@ const QuestionList: FC<Props> = ({ source }) => {<QueryGroupdata={QuestionOrderKeys}currentSort={curOrder}- i18nkeyPrefix="question"+ i18nKeyPrefix="question"/></Col></Row>diff --git a/ui/src/pages/Admin/Answers/index.tsx b/ui/src/pages/Admin/Answers/index.tsxindex 0ea39a66..f9a9de27 100644--- a/ui/src/pages/Admin/Answers/index.tsx+++ b/ui/src/pages/Admin/Answers/index.tsx@@ -85,7 +85,7 @@ const Answers: FC = () => {data={answerFilterItems}currentSort={curFilter}sortKey="status"- i18nkeyPrefix="admin.answers"+ i18nKeyPrefix="admin.answers"/><Form.Controldiff --git a/ui/src/pages/Admin/Flags/index.tsx b/ui/src/pages/Admin/Flags/index.tsxindex 0ba1081e..5eb14ec4 100644--- a/ui/src/pages/Admin/Flags/index.tsx+++ b/ui/src/pages/Admin/Flags/index.tsx@@ -62,7 +62,7 @@ const Flags: FC = () => {data={flagFilterKeys}currentSort={curFilter}sortKey="status"- i18nkeyPrefix="admin.flags"+ i18nKeyPrefix="admin.flags"/><Form.Selectdiff --git a/ui/src/pages/Admin/Questions/index.tsx b/ui/src/pages/Admin/Questions/index.tsxindex 71edd87f..373faf94 100644--- a/ui/src/pages/Admin/Questions/index.tsx+++ b/ui/src/pages/Admin/Questions/index.tsx@@ -104,7 +104,7 @@ const Questions: FC = () => {data={questionFilterItems}currentSort={curFilter}sortKey="status"- i18nkeyPrefix="admin.questions"+ i18nKeyPrefix="admin.questions"/><Form.Controldiff --git a/ui/src/pages/Admin/Users/index.tsx b/ui/src/pages/Admin/Users/index.tsxindex f7206f8a..6662b11f 100644--- a/ui/src/pages/Admin/Users/index.tsx+++ b/ui/src/pages/Admin/Users/index.tsx@@ -67,7 +67,7 @@ const Users: FC = () => {data={UserFilterKeys}currentSort={curFilter}sortKey="filter"- i18nkeyPrefix="admin.users"+ i18nKeyPrefix="admin.users"/><Form.Controldiff --git a/ui/src/pages/Questions/Detail/components/AnswerHead/index.tsx b/ui/src/pages/Questions/Detail/components/AnswerHead/index.tsxindex d03eefec..f2c7efe9 100644--- a/ui/src/pages/Questions/Detail/components/AnswerHead/index.tsx+++ b/ui/src/pages/Questions/Detail/components/AnswerHead/index.tsx@@ -34,7 +34,7 @@ const Index: FC<Props> = ({ count = 0, order = 'default' }) => {<QueryGroupdata={sortBtns}currentSort={order === 'updated' ? 'newest' : 'score'}- i18nkeyPrefix="question_detail.answers"+ i18nKeyPrefix="question_detail.answers"/></div>);diff --git a/ui/src/pages/Questions/index.tsx b/ui/src/pages/Questions/index.tsxindex 86a1092a..9e7ed318 100644--- a/ui/src/pages/Questions/index.tsx+++ b/ui/src/pages/Questions/index.tsx@@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next';import { PageTitle, FollowingTags } from '@answer/components';-import QuestionList from '@/components/Questions';+import QuestionList from '@/components/QuestionList';import HotQuestions from '@/components/HotQuestions';import { siteInfoStore } from '@/stores';diff --git a/ui/src/pages/Search/components/SearchHead/index.tsx b/ui/src/pages/Search/components/SearchHead/index.tsxindex 2f546322..2d7549a4 100644--- a/ui/src/pages/Search/components/SearchHead/index.tsx+++ b/ui/src/pages/Search/components/SearchHead/index.tsx@@ -22,7 +22,7 @@ const Index: FC<Props> = ({ sort, count = 0 }) => {data={sortBtns}currentSort={sort}sortKey="order"- i18nkeyPrefix="search.sort_btns"+ i18nKeyPrefix="search.sort_btns"/></ListGroupItem>);diff --git a/ui/src/pages/Tags/Detail/index.tsx b/ui/src/pages/Tags/Detail/index.tsxindex b3780259..cb736c92 100644--- a/ui/src/pages/Tags/Detail/index.tsx+++ b/ui/src/pages/Tags/Detail/index.tsx@@ -7,7 +7,7 @@ import * as Type from '@answer/common/interface';import { PageTitle, FollowingTags } from '@answer/components';import { useTagInfo, useFollow } from '@answer/api';-import QuestionList from '@/components/Questions';+import QuestionList from '@/components/QuestionList';import HotQuestions from '@/components/HotQuestions';const Questions: FC = () => {diff --git a/ui/src/pages/Tags/index.tsx b/ui/src/pages/Tags/index.tsxindex e8326951..2f9719f6 100644--- a/ui/src/pages/Tags/index.tsx+++ b/ui/src/pages/Tags/index.tsx@@ -60,7 +60,7 @@ const Tags = () => {data={sortBtns}currentSort={sort || 'popular'}sortKey="sort"- i18nkeyPrefix="tags.sort_buttons"+ i18nKeyPrefix="tags.sort_buttons"/></div></Col>diff --git a/ui/src/pages/Users/Personal/components/ListHead/index.tsx b/ui/src/pages/Users/Personal/components/ListHead/index.tsxindex f71226d4..e1ce494f 100644--- a/ui/src/pages/Users/Personal/components/ListHead/index.tsx+++ b/ui/src/pages/Users/Personal/components/ListHead/index.tsx@@ -32,7 +32,7 @@ const Index: FC<Props> = ({<QueryGroupdata={sortBtns}currentSort={sort}- i18nkeyPrefix="personal"+ i18nKeyPrefix="personal"/>)}</div>