Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2023-029
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2023-029
2023-029
Commits
556bf2eb
Commit
556bf2eb
authored
Sep 04, 2023
by
janithgamage1.ed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: update
Desc : update project
parent
69bfdd59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
Project/Frontend/SignConnectPlus/src/pages/learning-management/learning-curriculums-subscribed/tutorial/tutorial.tsx
...ent/learning-curriculums-subscribed/tutorial/tutorial.tsx
+7
-5
No files found.
Project/Frontend/SignConnectPlus/src/pages/learning-management/learning-curriculums-subscribed/tutorial/tutorial.tsx
View file @
556bf2eb
...
...
@@ -16,7 +16,6 @@ import { tutorialTypeUserProgress } from "types/userProgress";
import
{
CheckCircleOutlined
,
CheckOutlined
,
ClockCircleOutlined
,
FileMarkdownFilled
,
LeftOutlined
,
PlayCircleOutlined
,
RightOutlined
,
TrophyOutlined
,
UserOutlined
}
from
"
@ant-design/icons
"
;
import
{
PopupTransition
}
from
"
components/@extended/Transitions
"
;
import
ReportCard
from
"
components/cards/statistics/ReportCard
"
;
import
{
userProgress
}
from
"
data/userProgress
"
;
import
{
itemResultProps
,
selectedCommonDataProps
,
selectedItemContentProps
}
from
"
./types/types
"
;
import
CircularWithPath
from
"
components/@extended/progress/CircularWithPath
"
;
...
...
@@ -49,6 +48,7 @@ const Tutorial = () => {
const
theme
=
useTheme
();
const
dispatch
=
useDispatch
();
const
{
marksCalculator
,
error
,
success
,
isLoading
}
=
useSelector
(
state
=>
state
.
marksCalculator
);
const
{
userProgress
}
=
useSelector
(
state
=>
state
.
userProgress
);
const
[
data
,
setData
]
=
useState
<
tutorialTypeUserProgress
>
()
const
[
selectedItem
,
setSelectedItem
]
=
useState
<
{
selectedCommonData
:
selectedCommonDataProps
|
null
,
backgroundColor
:
any
|
null
}
>
({
...
...
@@ -70,11 +70,13 @@ const Tutorial = () => {
})
useEffect
(()
=>
{
const
firstTutorial
=
userProgress
?.
curriculums
?.[
0
]?.
tutorials
?.[
0
];
if
(
firstTutorial
)
{
setData
(
firstTutorial
);
if
(
userProgress
)
{
const
firstTutorial
=
userProgress
?.
curriculums
?.[
0
]?.
tutorials
?.[
0
];
if
(
firstTutorial
)
{
setData
(
firstTutorial
);
}
}
},
[]);
},
[
userProgress
]);
const
handleItemClick
=
(
item
:
selectedCommonDataProps
,
backgroundColor
:
any
)
=>
{
setSelectedItem
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment