Skip to content

Commit

Permalink
feat: conditional export tool feature added
Browse files Browse the repository at this point in the history
  • Loading branch information
varun2948 committed Dec 22, 2023
1 parent 9469377 commit 22d79a0
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions frontend/src/components/projectDetail/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { Alert } from '../alert';
import './styles.scss';
import { useWindowSize } from '../../hooks/UseWindowSize';
import { DownloadOsmData } from './downloadOsmData.js';
import { ENABLE_EXPORT_TOOL } from '../../config/index.js';

/* lazy imports must be last import */
const ProjectTimeline = React.lazy(() => import('./timeline' /* webpackChunkName: "timeline" */));
Expand Down Expand Up @@ -288,19 +289,21 @@ export const ProjectDetail = (props) => {
</div>

{/* Download OSM Data section Start */}

<div className="bg-tan-dim">
<a href="#downloadOsmData" name="downloadOsmData" style={{ visibility: 'hidden' }}>
<FormattedMessage {...messages.downloadOsmData} />
</a>
<h3 className={`${h2Classes}`}>
<FormattedMessage {...messages.downloadOsmData} />
</h3>
<DownloadOsmData
projectMappingTypes={props?.project?.mappingTypes}
project={props.project}
/>
</div>
{/* Converted String to Integer */}
{+ENABLE_EXPORT_TOOL === 1 && (
<div className="bg-tan-dim">
<a href="#downloadOsmData" name="downloadOsmData" style={{ visibility: 'hidden' }}>
<FormattedMessage {...messages.downloadOsmData} />
</a>
<h3 className={`${h2Classes}`}>
<FormattedMessage {...messages.downloadOsmData} />
</h3>
<DownloadOsmData
projectMappingTypes={props?.project?.mappingTypes}
project={props.project}
/>
</div>
)}

{/* Download OSM Data section End */}

Expand Down

0 comments on commit 22d79a0

Please sign in to comment.