11import { useState , useEffect } from "react" ;
22import { invoke } from "@tauri-apps/api/core" ;
33import { platform } from "@tauri-apps/plugin-os" ;
4- import { Download , RotateCcw , ExternalLink } from "lucide-react" ;
4+ import { Download , RotateCcw , ExternalLink , MessageSquare } from "lucide-react" ;
5+ import { openUrl } from "@tauri-apps/plugin-opener" ;
56
67import {
78 MPesaStatement ,
@@ -414,6 +415,17 @@ function App() {
414415 }
415416 } ;
416417
418+ const handleOpenFeedback = async ( ) => {
419+ try {
420+ await openUrl ( "https://mpesa2csv.com/feedback" ) ;
421+ } catch ( error : any ) {
422+ console . error (
423+ "Failed to open feedback page:" ,
424+ error . message || error . toString ( )
425+ ) ;
426+ }
427+ } ;
428+
417429 useEffect ( ( ) => {
418430 return ( ) => {
419431 if ( exportLink ) {
@@ -493,7 +505,7 @@ function App() {
493505 ) }
494506 </ div >
495507 ) : status === FileStatus . SUCCESS && statements . length > 0 ? (
496- < div className = "rounded-lg px-6 py-6 transition-all duration-300 max-h-full overflow-y-auto" >
508+ < div className = "rounded-lg px-6 transition-all duration-300 max-h-full overflow-y-auto" >
497509 < div className = "text-center mb-5" >
498510 < h2 className = "text-xl font-semibold text-primary mb-2" >
499511 ✅ Your Data is Ready!
@@ -560,7 +572,7 @@ function App() {
560572 </ Button >
561573 </ div >
562574
563- < div className = "pt-3 border-t border-border" >
575+ < div className = "pt-3 border-t border-border space-y-3 " >
564576 < p className = "text-xs text-center truncate" >
565577 File: { exportFileName }
566578 </ p >
@@ -569,6 +581,17 @@ function App() {
569581 Saved to: { savedFilePath }
570582 </ p >
571583 ) }
584+
585+ { /* Feedback Link */ }
586+ < div className = "flex items-center justify-center gap-2 pt-2" >
587+ < button
588+ onClick = { handleOpenFeedback }
589+ className = "inline-flex items-center gap-1.5 text-xs cursor-pointer hover:text-primary transition-colors"
590+ >
591+ < MessageSquare className = "w-3.5 h-3.5" />
592+ Share feedback or report an issue
593+ </ button >
594+ </ div >
572595 </ div >
573596 </ div >
574597 ) : null }
0 commit comments