Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gab-social
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
gab
social
gab-social
Commits
02247354
Commit
02247354
authored
Jan 14, 2020
by
mgabdev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added GroupListItem component
parent
81b2c009
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
app/javascript/gabsocial/components/group_list_item.js
app/javascript/gabsocial/components/group_list_item.js
+40
-0
No files found.
app/javascript/gabsocial/components/group_list_item.js
0 → 100644
View file @
02247354
import
React
from
'
react
'
;
import
ImmutablePropTypes
from
'
react-immutable-proptypes
'
;
import
ImmutablePureComponent
from
'
react-immutable-pure-component
'
;
import
{
defineMessages
,
injectIntl
}
from
'
react-intl
'
;
import
{
Link
}
from
'
react-router-dom
'
;
import
{
shortNumberFormat
}
from
'
../utils/numbers
'
;
const
messages
=
defineMessages
({
members
:
{
id
:
'
groups.card.members
'
,
defaultMessage
:
'
Members
'
},
});
export
default
@
injectIntl
class
GroupListItem
extends
ImmutablePureComponent
{
static
propTypes
=
{
group
:
ImmutablePropTypes
.
map
.
isRequired
,
}
render
()
{
const
{
intl
,
group
}
=
this
.
props
;
if
(
!
group
)
return
null
;
return
(
<
div
className
=
'
trends__item
'
>
<
div
className
=
'
trends__item__name
'
>
<
Link
to
=
{
`/groups/
${
group
.
get
(
'
id
'
)}
`
}
>
<
strong
>
{
group
.
get
(
'
title
'
)}
<
/strong
>
<
br
/>
<
span
>
{
shortNumberFormat
(
group
.
get
(
'
member_count
'
))}
&
nbsp
;
{
intl
.
formatMessage
(
messages
.
members
)}
<
/span
>
<
/Link
>
<
/div
>
<
/div
>
);
}
}
\ No newline at end of file
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