Commit 790e4333 authored by Eric Rosenbaum's avatar Eric Rosenbaum

lint

parent 94d0f30b
...@@ -13,133 +13,133 @@ import SocialMessage from '../../components/social-message/social-message.jsx'; ...@@ -13,133 +13,133 @@ import SocialMessage from '../../components/social-message/social-message.jsx';
import './studio.scss'; import './studio.scss';
const getComponentForItem = (item) => { const getComponentForItem = item => {
switch(item.type) { switch (item.type) {
case 'addprojecttostudio': case 'addprojecttostudio':
return ( return (
<SocialMessage <SocialMessage
datetime={item.datetime_created} datetime={item.datetime_created}
iconSrc="/svgs/studio/activity-project.svg" iconSrc="/svgs/studio/activity-project.svg"
iconAlt="project activity icon" iconAlt="project activity icon"
imgClassName="studio-activity-icon" imgClassName="studio-activity-icon"
key={item.id} key={item.id}
> >
<FormattedMessage <FormattedMessage
id="studio.activityAddProjectToStudio" id="studio.activityAddProjectToStudio"
values={{ values={{
profileLink: ( profileLink: (
<a href={`/users/${item.actor_id}`}> <a href={`/users/${item.actor_id}`}>
username username
</a> </a>
), ),
projectLink: ( projectLink: (
<a href={`/projects/${item.project_id}`}> <a href={`/projects/${item.project_id}`}>
{item.project_title} {item.project_title}
</a> </a>
) )
}} }}
/> />
</SocialMessage> </SocialMessage>
); );
case 'removeprojectstudio': case 'removeprojectstudio':
return ( return (
<SocialMessage <SocialMessage
datetime={item.datetime_created} datetime={item.datetime_created}
iconSrc="/svgs/studio/activity-project.svg" iconSrc="/svgs/studio/activity-project.svg"
iconAlt="project activity icon" iconAlt="project activity icon"
imgClassName="studio-activity-icon" imgClassName="studio-activity-icon"
key={item.id} key={item.id}
> >
<FormattedMessage <FormattedMessage
id="studio.activityRemoveProjectStudio" id="studio.activityRemoveProjectStudio"
values={{ values={{
profileLink: ( profileLink: (
<a href={`/users/${item.actor_id}`}> <a href={`/users/${item.actor_id}`}>
username username
</a> </a>
), ),
projectLink: ( projectLink: (
<a href={`/projects/${item.project_id}`}> <a href={`/projects/${item.project_id}`}>
{item.project_title} {item.project_title}
</a> </a>
) )
}} }}
/> />
</SocialMessage> </SocialMessage>
); );
case 'updatestudio': case 'updatestudio':
return ( return (
<SocialMessage <SocialMessage
datetime={item.datetime_created} datetime={item.datetime_created}
iconSrc="/svgs/studio/activity-edit.svg" iconSrc="/svgs/studio/activity-edit.svg"
iconAlt="edit activity icon" iconAlt="edit activity icon"
imgClassName="studio-activity-icon" imgClassName="studio-activity-icon"
key={item.id} key={item.id}
> >
<FormattedMessage <FormattedMessage
id="studio.activityUpdateStudio" id="studio.activityUpdateStudio"
values={{ values={{
profileLink: ( profileLink: (
<a href={`/users/${item.actor_id}`}> <a href={`/users/${item.actor_id}`}>
username username
</a> </a>
) )
}} }}
/> />
</SocialMessage> </SocialMessage>
); );
case 'becomecurator': case 'becomecurator':
return ( return (
<SocialMessage <SocialMessage
datetime={item.datetime_created} datetime={item.datetime_created}
iconSrc="/svgs/studio/activity-curator.svg" iconSrc="/svgs/studio/activity-curator.svg"
iconAlt="curator activity icon" iconAlt="curator activity icon"
imgClassName="studio-activity-icon" imgClassName="studio-activity-icon"
key={item.id} key={item.id}
> >
<FormattedMessage <FormattedMessage
id="studio.activityBecomeCurator" id="studio.activityBecomeCurator"
values={{ values={{
promotedProfileLink: ( promotedProfileLink: (
<a href={`/users/${item.actor_id}`}> <a href={`/users/${item.actor_id}`}>
username username
</a> </a>
), ),
promotorProfileLink: ( promotorProfileLink: (
<a href={`/users/${item.actor_id}`}> <a href={`/users/${item.actor_id}`}>
username username
</a> </a>
) )
}} }}
/> />
</SocialMessage> </SocialMessage>
); );
case 'becomeownerstudio': case 'becomeownerstudio':
return ( return (
<SocialMessage <SocialMessage
datetime={item.datetime_created} datetime={item.datetime_created}
iconSrc="/svgs/studio/activity-curator.svg" iconSrc="/svgs/studio/activity-curator.svg"
iconAlt="curator activity icon" iconAlt="curator activity icon"
imgClassName="studio-activity-icon" imgClassName="studio-activity-icon"
key={item.id} key={item.id}
> >
<FormattedMessage <FormattedMessage
id="studio.activityBecomeOwner" id="studio.activityBecomeOwner"
values={{ values={{
promotedProfileLink: ( promotedProfileLink: (
<a href={`/users/${item.actor_id}`}> <a href={`/users/${item.actor_id}`}>
username username
</a> </a>
), ),
promotorProfileLink: ( promotorProfileLink: (
<a href={`/users/${item.actor_id}`}> <a href={`/users/${item.actor_id}`}>
username username
</a> </a>
) )
}} }}
/> />
</SocialMessage> </SocialMessage>
); );
} }
}; };
...@@ -160,10 +160,10 @@ const StudioActivity = ({items, loading, error, onInitialLoad}) => { ...@@ -160,10 +160,10 @@ const StudioActivity = ({items, loading, error, onInitialLoad}) => {
label="Error" label="Error"
data={error} data={error}
/>} />}
<ul <ul
className="studio-messages-list" className="studio-messages-list"
> >
{items.map((item, index) => {items.map(item =>
getComponentForItem(item) getComponentForItem(item)
)} )}
</ul> </ul>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment