Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Todo-Firebase
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sonia Vidal Gonzalez
Todo-Firebase
Commits
60c05689
Commit
60c05689
authored
Sep 16, 2021
by
Sonia Vidal Gonzalez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ultimos cambios para lista la base de datos.
parent
c98233cf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
UserList.tsx
src/components/Home/UserList.tsx
+5
-1
db.ts
src/firebase/db.ts
+2
-2
firebase.ts
src/firebase/firebase.ts
+7
-7
No files found.
src/components/Home/UserList.tsx
View file @
60c05689
...
@@ -18,7 +18,11 @@ export class UserList extends React.Component<InterfaceProps, {}> {
...
@@ -18,7 +18,11 @@ export class UserList extends React.Component<InterfaceProps, {}> {
<
p
>
(Saved on Sign Up in Firebase Database)
</
p
>
<
p
>
(Saved on Sign Up in Firebase Database)
</
p
>
{
Object
.
keys
(
users
).
map
(
key
=>
(
{
Object
.
keys
(
users
).
map
(
key
=>
(
<
div
key=
{
key
}
>
{
users
[
key
].
username
}
</
div
>
<
div
key=
{
key
}
>
<
ul
>
<
li
>
{
users
[
key
].
username
}
</
li
>
</
ul
>
</
div
>
))
}
))
}
</
div
>
</
div
>
);
);
...
...
src/firebase/db.ts
View file @
60c05689
...
@@ -6,5 +6,5 @@ export const doCreateUser = (id: string, username: string, email: string) =>
...
@@ -6,5 +6,5 @@ export const doCreateUser = (id: string, username: string, email: string) =>
email
,
email
,
username
username
});
});
// Muy importante la barra invertida /
export
const
onceGetUsers
=
()
=>
db
.
ref
(
"users"
).
once
(
"value"
);
export
const
onceGetUsers
=
()
=>
db
.
ref
(
"
/
users"
).
once
(
"value"
);
src/firebase/firebase.ts
View file @
60c05689
...
@@ -3,13 +3,13 @@ import "firebase/auth";
...
@@ -3,13 +3,13 @@ import "firebase/auth";
import
"firebase/database"
;
import
"firebase/database"
;
const
config
=
{
const
config
=
{
apiKey
:
"AIzaSyCkKEnwHf_jNlvCa2pW7O_Wo6jBXMS-uhQ
"
,
apiKey
:
"AIzaSyC6IF_TzThVkBp5zOc4qQLurfhxRp_jHAY
"
,
authDomain
:
"fir-01-50904
.firebaseapp.com"
,
authDomain
:
"project-ii-ea7be
.firebaseapp.com"
,
projectId
:
"fir-01-50904
"
,
databaseURL
:
"https://project-ii-ea7be-default-rtdb.firebaseio.com
"
,
storageBucket
:
"fir-01-50904.appspot.com
"
,
projectId
:
"project-ii-ea7be
"
,
messagingSenderId
:
"768893068305
"
,
storageBucket
:
"project-ii-ea7be.appspot.com
"
,
appId
:
"1:768893068305:web:0baecb76f39dea20ed3db0
"
,
messagingSenderId
:
"145315012674
"
,
measurementId
:
"G-PTQQRK21P9
"
appId
:
"1:145315012674:web:cfda463e7acfb7c18acddb
"
};
};
...
...
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