Skip to content

Commit 038f1e2

Browse files
committed
Remove the top add credentials button credentials/home page
1 parent 7efe9f0 commit 038f1e2

File tree

2 files changed

+11
-23
lines changed

2 files changed

+11
-23
lines changed

src/pages/Home/Home.js

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -106,28 +106,16 @@ const Home = () => {
106106
<div className="flex justify-between items-center">
107107
<h1 className="text-2xl font-bold text-custom-blue">{t('common.navItemCredentials')}</h1>
108108

109-
<div className='flex gap-x-1'>
110-
{isSmallScreen && (
111-
<button
112-
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"
113-
onClick={openQRScanner} // Open the QR code scanner modal
114-
>
115-
<div className="flex items-center">
116-
<BsQrCodeScan size={20} className="text-white" />
117-
</div>
118-
</button>
119-
)}
109+
{isSmallScreen && (
120110
<button
121111
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"
122-
onClick={handleAddCredential}
112+
onClick={openQRScanner} // Open the QR code scanner modal
123113
>
124114
<div className="flex items-center">
125-
<BsPlusCircle size={20} className="text-white" />
126-
<span className="hidden sm:inline">&nbsp; {t('common.navItemCredentials')}</span>
115+
<BsQrCodeScan size={20} className="text-white" />
127116
</div>
128117
</button>
129-
</div>
130-
118+
)}
131119

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

221209
{/* QR Code Scanner Modal */}
222210
{isQRScannerOpen && (
223-
<QRCodeScanner
224-
onClose={closeQRScanner}
225-
/>
211+
<QRCodeScanner
212+
onClose={closeQRScanner}
213+
/>
226214
)}
227215

228216
{/* Delete Credential Modal */}

src/pages/SendCredentials/SendCredentials.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useState, useEffect } from 'react';
2-
import {BsQrCodeScan} from 'react-icons/bs'
2+
import { BsQrCodeScan } from 'react-icons/bs'
33
import { useTranslation } from 'react-i18next';
44

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

173173
{/* QR Code Scanner Modal */}
174174
{isQRScannerOpen && (
175-
<QRCodeScanner
176-
onClose={closeQRScanner}
177-
/>
175+
<QRCodeScanner
176+
onClose={closeQRScanner}
177+
/>
178178
)}
179179
</>
180180
);

0 commit comments

Comments
 (0)