Skip to content

Commit

Permalink
fix: remove core-app tag (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
Birkbjo authored Oct 1, 2021
1 parent feff793 commit 3e92a90
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 26 deletions.
12 changes: 1 addition & 11 deletions client/src/pages/AppView/AppView.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
Card,
Divider,
Button,
Tag,
} from '@dhis2/ui'
import classnames from 'classnames'
import PropTypes from 'prop-types'
Expand All @@ -18,13 +17,7 @@ import Screenshots from 'src/components/Screenshots/Screenshots'
import Versions from 'src/components/Versions/Versions'
import { renderDhisVersionsCompatibility } from 'src/lib/render-dhis-versions-compatibility'

const HeaderSection = ({
appName,
appDeveloper,
appType,
logoSrc,
isCoreApp,
}) => (
const HeaderSection = ({ appName, appDeveloper, appType, logoSrc }) => (
<section
className={classnames(styles.appCardSection, styles.appCardHeader)}
>
Expand All @@ -34,15 +27,13 @@ const HeaderSection = ({
<span className={styles.appCardDeveloper}>by {appDeveloper}</span>
<span className={styles.appCardType}>{appType}</span>
</div>
{isCoreApp && <Tag>Core App</Tag>}
</section>
)

HeaderSection.propTypes = {
appDeveloper: PropTypes.string.isRequired,
appName: PropTypes.string.isRequired,
appType: PropTypes.string.isRequired,
isCoreApp: PropTypes.bool,
logoSrc: PropTypes.string,
}

Expand Down Expand Up @@ -120,7 +111,6 @@ const AppView = ({ match }) => {
appDeveloper={appDeveloper}
appType={config.ui.appTypeToDisplayName[app.appType]}
logoSrc={logoSrc}
isCoreApp={app.coreApp}
/>
<Divider />
<AboutSection
Expand Down
13 changes: 1 addition & 12 deletions client/src/pages/Apps/AppCards/AppCardItem/AppCardItem.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Tag } from '@dhis2/ui'
import PropTypes from 'prop-types'
import React from 'react'
import { Link } from 'react-router-dom'
Expand All @@ -14,15 +13,7 @@ const summarise = text => {
return text
}

const AppCardItem = ({
id,
name,
developer,
type,
description,
images,
isCoreApp,
}) => {
const AppCardItem = ({ id, name, developer, type, description, images }) => {
const logo = images.find(elem => elem.logo)

return (
Expand All @@ -38,7 +29,6 @@ const AppCardItem = ({
{config.ui.appTypeToDisplayName[type]}
</span>
</div>
{isCoreApp && <Tag>Core App</Tag>}
</header>

<p className={styles.appCardDescription}>
Expand All @@ -58,7 +48,6 @@ AppCardItem.propTypes = {
type: PropTypes.string.isRequired,
description: PropTypes.string,
images: PropTypes.array,
isCoreApp: PropTypes.bool,
}

export default AppCardItem
1 change: 0 additions & 1 deletion client/src/pages/Apps/AppCards/AppCards.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const AppCards = ({ isLoading, error, apps }) => {
type={app.appType}
description={app.description}
images={app.images}
isCoreApp={app.coreApp}
/>
))}
</div>
Expand Down
3 changes: 1 addition & 2 deletions client/src/pages/UserApp/DetailsCard/DetailsCard.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Card, Button, Divider, Tag } from '@dhis2/ui'
import { Card, Button, Divider } from '@dhis2/ui'
import PropTypes from 'prop-types'
import { useState, useRef } from 'react'
import { Link } from 'react-router-dom'
Expand Down Expand Up @@ -92,7 +92,6 @@ const DetailsCard = ({ app, mutate }) => {
</span>
<span className={styles.detailsCardType}>{appType}</span>
</div>
{app.coreApp && <Tag>Core App</Tag>}
</section>
<Divider />
<section>
Expand Down

0 comments on commit 3e92a90

Please sign in to comment.