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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SE-PROJECT-TEAM
Digital course file
Commits
1b86968d
Commit
1b86968d
authored
4 years ago
by
Ganapathi Subramanyam Jayam
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://git.amrita.edu/se-project-team/digital-course-file
parents
9be9ff99
907c499d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
digital-course-file/src/hooks/useFolder.js
+3
-3
3 additions, 3 deletions
digital-course-file/src/hooks/useFolder.js
digital-course-file/src/user/Hero.js
+1
-4
1 addition, 4 deletions
digital-course-file/src/user/Hero.js
with
4 additions
and
7 deletions
digital-course-file/src/hooks/useFolder.js
+
3
−
3
View file @
1b86968d
...
...
@@ -5,7 +5,7 @@ import Loader from "react-loader-spinner";
export
const
ROOT_FOLDER
=
{
name
:
'
Courses
'
,
id
:
null
,
path
:
[]
,
parents
:
[]};
export
function
useFolder
(
folderId
=
null
,
folder
=
null
,
rand
)
{
export
function
useFolder
(
folderId
=
null
,
folder
=
null
)
{
// const {currentUser} = firebase.auth.currentUser;
...
...
@@ -109,7 +109,7 @@ export function useFolder( folderId = null, folder= null,rand) {
payload
:
{
childFolders
:
snapshot
.
docs
.
map
(
database
.
formatDoc
)
}
})
})
},[
folderId
,
rand
])
},[
folderId
])
useEffect
(()
=>
{
if
(
firebase
.
auth
().
currentUser
)
{
...
...
@@ -126,7 +126,7 @@ export function useFolder( folderId = null, folder= null,rand) {
)
}
},
[
folderId
,
rand
])
},
[
folderId
])
return
state
;
}
This diff is collapsed.
Click to expand it.
digital-course-file/src/user/Hero.js
+
1
−
4
View file @
1b86968d
...
...
@@ -14,17 +14,14 @@ import 'firebase/storage'
import
Loader
from
'
react-loader-spinner
'
import
Dropzone
from
'
./Dropzone
'
import
ParticlesBg
from
'
particles-bg
'
import
{
v4
as
uuidV4
}
from
'
uuid
'
const
Hero
=
({
handleLogout
})
=>
{
const
{
folderId
}
=
useParams
()
const
{
state
=
{}
}
=
useLocation
()
const
rand
=
uuidV4
()
const
{
folder
,
childFolders
,
childFiles
}
=
useFolder
(
folderId
,
state
.
folder
,
rand
state
.
folder
)
if
(
!
folder
)
{
...
...
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