Skip to content

Commit

Permalink
Merge pull request #150 from randr000/enhancement/create_documentatio…
Browse files Browse the repository at this point in the history
…n_link_component

enhancement: create documentation link component #143
  • Loading branch information
whoabuddy authored Jun 16, 2022
2 parents b69ac68 + 53d718b commit 4b05c79
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
5 changes: 4 additions & 1 deletion src/components/activation/RegisterUser.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import ComingSoon from '../common/ComingSoon';
import DocumentationLink from '../common/DocumentationLink';

export default function RegisterUser() {
return (
<div className="container-fluid p-6">
<h3>Register User</h3>
<h3>{`Register User `}
<DocumentationLink docLink="https://docs.citycoins.co/core-protocol/registration-and-activation" />
</h3>
<ComingSoon />
</div>
);
Expand Down
12 changes: 12 additions & 0 deletions src/components/common/DocumentationLink.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export default function DocumentationLink({ docLink }) {
return (
<a
className="primary-link"
target="_blank"
rel="noreferrer"
href={docLink}
>
<i className="bi bi-question-circle"></i>
</a>
)
}
10 changes: 2 additions & 8 deletions src/components/mining/ClaimMiningRewards.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useAtom } from 'jotai';
import CurrentStacksBlock from '../common/CurrentStacksBlock';
import FormResponse from '../common/FormResponse';
import LoadingSpinner from '../common/LoadingSpinner';
import DocumentationLink from '../common/DocumentationLink';
import { currentStacksBlockAtom, stxAddressAtom } from '../../store/stacks';
import { CITY_CONFIG, CITY_INFO, currentCityAtom } from '../../store/cities';
import { canClaimMiningReward, isBlockWinner } from '../../lib/citycoins';
Expand Down Expand Up @@ -175,14 +176,7 @@ export default function ClaimMiningRewards() {
<div className="container-fluid p-6">
<h3>
{`Claim ${symbol ? symbol + ' ' : ''}Mining Rewards`}{' '}
<a
className="primary-link"
target="_blank"
rel="noreferrer"
href="https://docs.citycoins.co/core-protocol/mining-citycoins"
>
<i className="bi bi-question-circle"></i>
</a>
<DocumentationLink docLink="https://docs.citycoins.co/core-protocol/mining-citycoins" />
</h3>
<CurrentStacksBlock />
<p>
Expand Down
5 changes: 4 additions & 1 deletion src/components/mining/MineCityCoins.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import ComingSoon from '../common/ComingSoon';
import DocumentationLink from '../common/DocumentationLink';

export default function MineCityCoins() {
return (
<div className="container-fluid p-6">
<h3>Mine CityCoins</h3>
<h3>{`Mine CityCoins `}
<DocumentationLink docLink="https://docs.citycoins.co/core-protocol/mining-citycoins" />
</h3>
<ComingSoon />
</div>
);
Expand Down
10 changes: 2 additions & 8 deletions src/components/stacking/ClaimStackingRewards.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { currentStacksBlockAtom } from '../../store/stacks';
import CurrentRewardCycle from '../common/CurrentRewardCycle';
import FormResponse from '../common/FormResponse';
import LoadingSpinner from '../common/LoadingSpinner';
import DocumentationLink from '../common/DocumentationLink';
import StackingReward from './StackingReward';

export default function ClaimStackingRewards() {
Expand Down Expand Up @@ -140,14 +141,7 @@ export default function ClaimStackingRewards() {
<div className="container-fluid p-6 mb-3">
<h3>
{`Claim ${symbol ? symbol + ' ' : ''}Stacking Rewards`}{' '}
<a
className="primary-link"
target="_blank"
rel="noreferrer"
href="https://docs.citycoins.co/core-protocol/stacking-citycoins"
>
<i className="bi bi-question-circle"></i>
</a>
<DocumentationLink docLink="https://docs.citycoins.co/core-protocol/stacking-citycoins" />
</h3>
<CurrentRewardCycle />
<p>
Expand Down
10 changes: 2 additions & 8 deletions src/components/stacking/StackCityCoins.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { stxAddressAtom, userBalancesAtom } from '../../store/stacks';
import CurrentRewardCycle from '../common/CurrentRewardCycle';
import FormResponse from '../common/FormResponse';
import LoadingSpinner from '../common/LoadingSpinner';
import DocumentationLink from '../common/DocumentationLink';
import StackingStats from '../dashboard/StackingStats';

export default function StackCityCoins() {
Expand Down Expand Up @@ -185,14 +186,7 @@ export default function StackCityCoins() {
<div className="container-fluid p-6">
<h3>
{`Stacking ${symbol ? symbol : 'CityCoins'}`}{' '}
<a
className="primary-link"
target="_blank"
rel="noreferrer"
href="https://docs.citycoins.co/core-protocol/stacking-citycoins"
>
<i className="bi bi-question-circle"></i>
</a>
<DocumentationLink docLink="https://docs.citycoins.co/core-protocol/stacking-citycoins"/>
</h3>
<CurrentRewardCycle symbol={symbol} />
<p>
Expand Down

0 comments on commit 4b05c79

Please sign in to comment.