-
-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6592 from hotosm/feature/6302-view-task-instructions
View Task Instructions without login
- Loading branch information
Showing
16 changed files
with
271 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,3 +36,7 @@ | |
.react-tooltip#dueDateBoxTooltip { | ||
z-index: 999; | ||
} | ||
|
||
.project-instructions-link { | ||
letter-spacing: -0.0857513px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
import { FormattedMessage } from 'react-intl'; | ||
import { useSelector } from 'react-redux'; | ||
|
||
import messages from './messages'; | ||
|
||
export const TabSelector = ({ activeSection, setActiveSection }) => ( | ||
<div className="ttu barlow-condensed f4 blue-dark bb b--grey-light"> | ||
{['tasks', 'instructions', 'contributions'].map((section) => ( | ||
<div | ||
key={section} | ||
role="button" | ||
className={`mr4 pb2 fw5 pointer dib ${activeSection === section && 'bb bw1'}`} | ||
style={{ letterSpacing: '-0.0857513px', borderColor: '#979797' }} | ||
onClick={() => setActiveSection(section)} | ||
> | ||
<FormattedMessage {...messages[section]} /> | ||
</div> | ||
))} | ||
</div> | ||
); | ||
export const TabSelector = ({ activeSection, setActiveSection }) => { | ||
const token = useSelector((state) => state.auth.token); | ||
const tabs = token ? ['tasks', 'instructions', 'contributions'] : ['instructions']; | ||
|
||
return ( | ||
<div className="ttu barlow-condensed f4 blue-dark bb b--grey-light"> | ||
{tabs.map((section) => ( | ||
<div | ||
key={section} | ||
role="button" | ||
className={`mr4 pb2 fw5 pointer dib ${activeSection === section && 'bb bw1'}`} | ||
style={{ letterSpacing: '-0.0857513px', borderColor: '#979797' }} | ||
onClick={() => setActiveSection(section)} | ||
> | ||
<FormattedMessage {...messages[section]} /> | ||
</div> | ||
))} | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.