Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement categories route #1161

Merged
merged 16 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/constants/translations/en/my-resources-page.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"lessons": "Lessons",
"quizzes": "Quizzes",
"questions": "Questions",
"attachments": "Attachments"
"attachments": "Attachments",
"categories": "Categories"
},
"lessons": {
"addBtn": "New lesson",
Expand Down
3 changes: 2 additions & 1 deletion src/constants/translations/ua/my-resources-page.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"lessons": "Уроки",
"tests": "Тести",
"questions": "Запитання",
"attachments": "Вкладення"
"attachments": "Вкладення",
"categories": "Категорії"
},
"lessons": {
"addBtn": "Новий урок",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Box from '@mui/material/Box'

const CategoriesContainer = () => {
return (
<Box>
<h3>Categories Page</h3>
</Box>
)
}

export default CategoriesContainer
7 changes: 7 additions & 0 deletions src/pages/my-resources/MyResources.constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import ArticleOutlinedIcon from '@mui/icons-material/ArticleOutlined'
import AttachFileIcon from '@mui/icons-material/AttachFile'
import NoteAltOutlinedIcon from '@mui/icons-material/NoteAltOutlined'
import QuizOutlinedIcon from '@mui/icons-material/QuizOutlined'
import CategoryIcon from '@mui/icons-material/Category'

import AttachmentsContainer from '~/containers/my-resources/attachments-container/AttachmentsContainer'
import QuizzesContainer from '~/containers/my-quizzes/QuizzesContainer'
import LessonsContainer from '~/containers/my-resources/lessons-container/LessonsContainer'
import QuestionsContainer from '~/containers/my-resources/questions-container/QuestionsContainer'
import CategoriesContainer from '~/containers/my-resources/categories-container/CategoriesContainer'

interface TabsData {
[key: string]: {
Expand Down Expand Up @@ -37,5 +39,10 @@ export const tabsData: TabsData = {
title: 'myResourcesPage.tabs.attachments',
content: <AttachmentsContainer />,
icon: <AttachFileIcon />
},
categories: {
title: 'myResourcesPage.tabs.categories',
content: <CategoriesContainer />,
icon: <CategoryIcon />
}
}
Mav-Ivan marked this conversation as resolved.
Show resolved Hide resolved
19 changes: 19 additions & 0 deletions src/pages/my-resources/MyResources.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,24 @@ export const styles = {
title: {
typography: TypographyVariantEnum.H4,
mb: '40px'
},
tabs: {
display: 'flex',
borderBottom: '1px solid',
borderColor: 'primary.100',
mb: '24px',
'& > button:last-child': {
borderLeft: '1px solid',
borderColor: 'primary.100'
}
},
titleBox: {
display: 'flex',
alignItems: 'center',
gap: '16px',
'& > svg': {
width: '16px',
height: '16px'
}
}
}