Skip to content

Commit

Permalink
Remove the top add credentials button credentials/home page
Browse files Browse the repository at this point in the history
  • Loading branch information
gkatrakazas committed Apr 3, 2024
1 parent 7efe9f0 commit 038f1e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 23 deletions.
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

0 comments on commit 038f1e2

Please sign in to comment.