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
81c29d30
Commit
81c29d30
authored
Nov 28, 2021
by
Benjamín Balun
Browse files
list of items added
parent
cfb15f90
Changes
1
Show whitespace changes
Inline
Side-by-side
src/pages/Store.tsx
View file @
81c29d30
import
{
Button
,
Card
,
Col
,
Modal
,
Row
,
Typography
}
from
'
antd
'
;
import
{
DollarOutlined
,
QuestionCircleOutlined
}
from
'
@ant-design/icons
'
;
import
{
useMemo
,
useState
}
from
'
react
'
;
import
usePageTitle
from
'
../hooks/usePageTitle
'
;
import
{
Food
,
food
}
from
'
../data/food
'
;
import
{
Pokeball
,
pokeballs
}
from
'
../data/pokeballs
'
;
import
{
useLoggedInUser
}
from
'
../hooks/useLoggedInUser
'
;
import
{
Loading
}
from
'
../utils/Loading
'
;
...
...
@@ -14,11 +17,36 @@ const Store = () => {
}
return
(
<>
<
div
style
=
{
{
textAlign
:
'
right
'
}
}
>
<
Typography
>
Current funds:
{
userData
?.
actualScore
}
<
DollarOutlined
/>
</
Typography
>
</
div
>
<
Row
gutter
=
{
[
10
,
10
]
}
>
{
[...
food
,
...
pokeballs
].
map
((
item
,
index
)
=>
(
<
Col
key
=
{
index
}
style
=
{
{
width
:
'
200px
'
}
}
>
<
Card
title
=
{
item
.
name
}
hoverable
cover
=
{
item
.
image
?
(
<
img
alt
=
{
item
.
name
}
src
=
{
item
.
image
}
/>
)
:
(
<
QuestionCircleOutlined
style
=
{
{
fontSize
:
'
150px
'
}
}
/>
)
}
>
<
p
>
Price:
{
item
.
price
}
<
DollarOutlined
/>
</
p
>
<
Button
type
=
"primary"
>
Buy
</
Button
>
</
Card
>
</
Col
>
))
}
</
Row
>
</>
);
};
...
...
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