Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing Redundant 'Add Credentials' Button #218

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 7 additions & 19 deletions src/pages/Home/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,28 +106,16 @@ const Home = () => {
<div className="flex justify-between items-center">
<h1 className="text-2xl font-bold text-custom-blue">{t('common.navItemCredentials')}</h1>

<div className='flex gap-x-1'>
{isSmallScreen && (
<button
className="px-2 py-2 mb-2 text-white bg-custom-blue hover:bg-custom-blue-hover focus:ring-4 focus:outline-none focus:ring-custom-blue font-medium rounded-lg text-sm px-4 py-2 text-center dark:bg-custom-blue-hover dark:hover:bg-custom-blue-hover dark:focus:ring-custom-blue-hover"
onClick={openQRScanner} // Open the QR code scanner modal
>
<div className="flex items-center">
<BsQrCodeScan size={20} className="text-white" />
</div>
</button>
)}
{isSmallScreen && (
<button
className="px-2 py-2 mb-2 text-white bg-custom-blue hover:bg-custom-blue-hover focus:ring-4 focus:outline-none focus:ring-custom-blue font-medium rounded-lg text-sm px-4 py-2 text-center dark:bg-custom-blue-hover dark:hover:bg-custom-blue-hover dark:focus:ring-custom-blue-hover"
onClick={handleAddCredential}
onClick={openQRScanner} // Open the QR code scanner modal
>
<div className="flex items-center">
<BsPlusCircle size={20} className="text-white" />
<span className="hidden sm:inline">&nbsp; {t('common.navItemCredentials')}</span>
<BsQrCodeScan size={20} className="text-white" />
</div>
</button>
</div>

)}

</div>
<hr className="mb-2 border-t border-custom-blue/80" />
Expand Down Expand Up @@ -220,9 +208,9 @@ const Home = () => {

{/* QR Code Scanner Modal */}
{isQRScannerOpen && (
<QRCodeScanner
onClose={closeQRScanner}
/>
<QRCodeScanner
onClose={closeQRScanner}
/>
)}

{/* Delete Credential Modal */}
Expand Down
8 changes: 4 additions & 4 deletions src/pages/SendCredentials/SendCredentials.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useEffect } from 'react';
import {BsQrCodeScan} from 'react-icons/bs'
import { BsQrCodeScan } from 'react-icons/bs'
import { useTranslation } from 'react-i18next';

import QRCodeScanner from '../../components/QRCodeScanner/QRCodeScanner'; // Replace with the actual import path
Expand Down Expand Up @@ -172,9 +172,9 @@ const Verifiers = () => {

{/* QR Code Scanner Modal */}
{isQRScannerOpen && (
<QRCodeScanner
onClose={closeQRScanner}
/>
<QRCodeScanner
onClose={closeQRScanner}
/>
)}
</>
);
Expand Down
Loading