Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
insu-learn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Katarína Sieklová
insu-learn
Commits
93bedff1
There was an error fetching the commit references. Please try again later.
Commit
93bedff1
authored
1 year ago
by
Katarína Sieklová
Browse files
Options
Downloads
Patches
Plain Diff
feat: animation at the summary step
parent
b8baf11d
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
index.html
+1
-0
1 addition, 0 deletions
index.html
src/components/InsulinTest.tsx
+10
-4
10 additions, 4 deletions
src/components/InsulinTest.tsx
src/hooks/useAnimate.tsx
+1
-1
1 addition, 1 deletion
src/hooks/useAnimate.tsx
with
12 additions
and
5 deletions
index.html
+
1
−
0
View file @
93bedff1
...
...
@@ -16,6 +16,7 @@
<script
src=
"/animations/insulinTest_q2.js"
type=
"text/javascript"
></script>
<script
src=
"/animations/insulinTest_q3.js"
type=
"text/javascript"
></script>
<script
src=
"/animations/insulinTest_q4.js"
type=
"text/javascript"
></script>
<script
src=
"/animations/happy.js"
type=
"text/javascript"
></script>
<script
type=
"module"
src=
"/src/main.tsx"
></script>
</body>
</html>
This diff is collapsed.
Click to expand it.
src/components/InsulinTest.tsx
+
10
−
4
View file @
93bedff1
...
...
@@ -77,11 +77,17 @@ const InsulinTest = () => {
steps
=
{
generateSteps
()
}
activeStep
=
{
currentStep
}
/>
<
div
className
=
"text-center"
>
<
div
className
=
"text-center
justify-center inline-block
"
>
{
isSummaryStep
?
(
<
p
className
=
"text-xl font-semibold py-4"
>
{
`
${
scoreText
}
${(
score
/
5
)
*
100
}
%`
}
</
p
>
<
div
className
=
"w-[300px] h-[700px]"
>
<
p
className
=
"text-xl font-semibold"
>
{
`
${
scoreText
}
${(
score
/
5
)
*
100
}
%`
}
</
p
>
<
AnimateCC
animationName
=
"happy"
getAnimationObject
=
{
getAnimationObject
}
/>
</
div
>
)
:
isDraggableTestStep
?
(
<></>
)
:
(
...
...
This diff is collapsed.
Click to expand it.
src/hooks/useAnimate.tsx
+
1
−
1
View file @
93bedff1
import
{
SetStateAction
,
useEffect
,
useRef
,
useState
}
from
"
react
"
;
import
React
,
{
SetStateAction
,
useEffect
,
useRef
,
useState
}
from
"
react
"
;
import
{
TypewriterClass
}
from
"
typewriter-effect
"
;
import
{
useNavigate
}
from
"
react-router-dom
"
;
import
{
useRecoilValue
}
from
"
recoil
"
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment