Q & A + journal (#174)

* tasks

* task input

* community route

* added thread and list for community QA

* answers thread

* journal sidebar section

* journal calendar

* fix: stuff

* fix: stuff

* fix: stuff

* chore: disable comunitty toggle

* fix: typo import header

---------

Co-authored-by: marshennikovaolga <marshennikova@gmail.com>
Co-authored-by: Aslam H <iupin5212@gmail.com>
This commit is contained in:
Nikita
2024-09-28 15:47:10 +03:00
committed by GitHub
parent 34d69be960
commit 3e7c8cf38a
24 changed files with 720 additions and 89 deletions
-8
View File
@@ -43,7 +43,6 @@ export const MainTopicList: React.FC<MainTopicListProps> = ({ me }) => {
const isTablet = useMedia("(max-width: 640px)")
const [activeItemIndex, setActiveItemIndex] = React.useState<number | null>(null)
const [keyboardActiveIndex, setKeyboardActiveIndex] = React.useState<number | null>(null)
const router = useRouter()
const personalTopics = React.useMemo(
() => [
@@ -54,13 +53,6 @@ export const MainTopicList: React.FC<MainTopicListProps> = ({ me }) => {
[me.root.topicsWantToLearn, me.root.topicsLearning, me.root.topicsLearned]
)
const handleEnter = React.useCallback(
(selectedTopic: Topic) => {
router.push(`/${selectedTopic.name}`)
},
[router]
)
const next = () => Math.min((activeItemIndex ?? 0) + 1, (personalTopics?.length ?? 0) - 1)
const prev = () => Math.max((activeItemIndex ?? 0) - 1, 0)