refactor(client): migrate Bootstrap button in challenge templates (#52577)

This commit is contained in:
Huyen Nguyen
2024-01-05 19:07:37 +07:00
committed by GitHub
parent 829e195a0b
commit c93db9533e
29 changed files with 163 additions and 174 deletions

View File

@@ -1,9 +1,10 @@
import { Button } from '@freecodecamp/react-bootstrap';
import { navigate } from 'gatsby-link';
import React, { useState, useEffect, MouseEvent } from 'react';
import { useTranslation, withTranslation } from 'react-i18next';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { Button } from '@freecodecamp/ui';
import {
certSlugTypeMap,
superBlockCertTypeMap
@@ -123,12 +124,11 @@ const CertChallenge = ({
: createFlashMessage(honestyInfoMessage);
};
return (
<div className='block'>
<div>
{isSignedIn && (
<Button
block={true}
bsStyle='primary'
className='cert-btn'
variant='primary'
href={isCertified ? certLocation : `/settings#certification-settings`}
onClick={() => (isCertified ? createClickHandler(certSlug) : false)}
>