diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 0000000..5073c20 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1 @@ +module.exports = { extends: ["@commitlint/config-conventional"] }; diff --git a/package.json b/package.json index f46a2ee..4452757 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ "@storybook/preset-create-react-app": "^3.2.0", "@storybook/react": "^6.3.8", "craco-alias": "^3.0.1", - "eslint-config-next": "^12.0.1" + "eslint-config-next": "^12.0.1", + "commitlint": "^16.2.3" } } diff --git a/src/components/Sidebar/sidebarPresenter.tsx b/src/components/Sidebar/sidebarPresenter.tsx index ae3adbb..2ca882e 100644 --- a/src/components/Sidebar/sidebarPresenter.tsx +++ b/src/components/Sidebar/sidebarPresenter.tsx @@ -11,7 +11,7 @@ import RequestApi from "utils/libs/requestApi"; import { AxiosResponse } from "axios"; const SideBar: React.FC = () => { - const { isAdmin } = useRecoilValue(hasTokenState); + const { isAdmin, isLogin } = useRecoilValue(hasTokenState); const [tagClicked, setTagClicked] = useState(false); const question = useGetQuestion(); const [count, setCount] = useState>([ @@ -103,15 +103,19 @@ const SideBar: React.FC = () => { ))} - { - setQuestionAnswer(value); - }} - value={questionAnswer} - /> + onChange={({ target: { value } }) => { + setQuestionAnswer(value); + }} + value={questionAnswer} + /> + )}