Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Ondřej Bazala
PV247
Commits
ef528e75
Commit
ef528e75
authored
Nov 28, 2021
by
Benjamín Balun
Browse files
refactor: current funds
parent
82b8cd1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/pages/Store/Funds.tsx
0 → 100644
View file @
ef528e75
import
{
DollarOutlined
}
from
'
@ant-design/icons
'
;
import
{
Typography
}
from
'
antd
'
;
const
Funds
=
({
funds
}:
{
funds
:
number
})
=>
(
<
div
style
=
{
{
textAlign
:
'
right
'
,
margin
:
'
1rem
'
}
}
>
<
Typography
>
Current funds:
{
funds
}
<
DollarOutlined
/>
</
Typography
>
</
div
>
);
export
default
Funds
;
src/pages/Store/Store.tsx
View file @
ef528e75
import
{
Button
,
Card
,
Col
,
Modal
,
Row
,
Typography
}
from
'
antd
'
;
import
{
Button
,
Card
,
Col
,
Modal
,
Row
}
from
'
antd
'
;
import
{
DollarOutlined
,
QuestionCircleOutlined
}
from
'
@ant-design/icons
'
;
import
usePageTitle
from
'
../../hooks/usePageTitle
'
;
...
...
@@ -8,6 +8,8 @@ import { useLoggedInUser } from '../../hooks/useLoggedInUser';
import
{
Loading
}
from
'
../../utils/Loading
'
;
import
{
updateUserDataInFirebase
}
from
'
../../utils/firebase
'
;
import
Funds
from
'
./Funds
'
;
const
Store
=
()
=>
{
usePageTitle
(
'
Store
'
);
const
{
userData
}
=
useLoggedInUser
();
...
...
@@ -66,11 +68,7 @@ const Store = () => {
return
(
<>
<
div
style
=
{
{
textAlign
:
'
right
'
,
margin
:
'
1rem
'
}
}
>
<
Typography
>
Current funds:
{
userData
?.
actualScore
}
<
DollarOutlined
/>
</
Typography
>
</
div
>
<
Funds
funds
=
{
userData
?.
actualScore
}
/>
<
Row
gutter
=
{
[
10
,
10
]
}
>
{
[...
food
,
...
pokeballs
].
map
((
item
,
index
)
=>
(
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment