Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Digital course file
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SE-PROJECT-TEAM
Digital course file
Commits
9a602876
Commit
9a602876
authored
4 years ago
by
Nidharshan A
Browse files
Options
Downloads
Patches
Plain Diff
UpdatedFolders
parent
c1ff2b49
No related branches found
No related tags found
1 merge request
!32
Createfolder
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
digital-course-file/src/user/Hero.js
+38
-3
38 additions, 3 deletions
digital-course-file/src/user/Hero.js
with
38 additions
and
3 deletions
digital-course-file/src/user/Hero.js
+
38
−
3
View file @
9a602876
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
AddFolder
from
"
./AddFolder
"
;
import
{
Container
,
Button
}
from
"
react-bootstrap
"
;
import
{
useFolder
}
from
"
.././hooks/useFolder
"
;
import
Folder
from
"
./Folder
"
;
import
FolderNav
from
"
./FolderNav
"
;
import
{
useParams
}
from
"
react-router-dom
"
;
const
Hero
=
({
handleLogout
})
=>
{
const
Hero
=
({
handleLogout
})
=>
{
const
{
folderId
}
=
useParams
();
const
{
folder
,
childFolders
}
=
useFolder
(
folderId
);
return
(
return
(
<>
<
section
className
=
"
hero
"
>
<
section
className
=
"
hero
"
>
<
nav
>
<
nav
>
<
h2
>
Welcome
peop
le
<
/h2
>
<
h2
>
Course
Fi
le
<
/h2
>
<
button
onClick
=
{
handleLogout
}
>
Logout
<
/button
>
<
button
className
=
"
logoutbutton
"
onClick
=
{
handleLogout
}
>
Logout
<
/button
>
<
/nav
>
<
/nav
>
<
/section
>
<
/section
>
)
<
Container
fluid
>
Contents
<
/Container
>
<
Container
fluid
>
<
div
className
=
"
d-flex align-items-center
"
>
<
FolderNav
currentFolder
=
{
folder
}
/
>
<
AddFolder
currentFolder
=
{
folder
}
/
>
<
/div
>
{
childFolders
.
length
>
0
&&
(
<
div
className
=
"
d-flex flex-wrap
"
>
{
childFolders
.
map
(
childFolder
=>
(
<
div
key
=
{
childFolder
.
id
}
style
=
{
{
maxWidth
:
"
250px
"
}}
className
=
"
p-2
"
>
<
Folder
folder
=
{
childFolder
}
><
/Folder
>
<
/div
>
))}
<
/div
>
)}
<
/Container
>
<
/>
);
}
}
export
default
Hero
;
export
default
Hero
;
\ No newline at end of file
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