Skip to content

Commit 82a4cc9

Browse files
committed
feat: Add SMTP Checker feature, including its component, export, and integration into the application's navigation and component mapping.
1 parent c07af6f commit 82a4cc9

3 files changed

Lines changed: 60 additions & 2 deletions

File tree

src/App.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import {
88
KeyRound,
99
Hash,
1010
Lock,
11-
CalendarClock
11+
CalendarClock,
12+
Mail
1213
} from 'lucide-react';
1314

1415
// Layout components
@@ -24,7 +25,8 @@ import {
2425
PasswordGenerator,
2526
HashGenerator,
2627
BasicAuthGenerator,
27-
CrontabGenerator
28+
CrontabGenerator,
29+
SmtpChecker
2830
} from './features';
2931

3032
/**
@@ -40,6 +42,7 @@ const NAV_ITEMS = [
4042
{ id: 'hash', label: 'Hash Generator', icon: Hash },
4143
{ id: 'basicauth', label: 'Basic Auth', icon: KeyRound },
4244
{ id: 'crontab', label: 'Crontab Gen', icon: CalendarClock },
45+
{ id: 'smtp', label: 'SMTP Checker', icon: Mail },
4346
];
4447

4548
/**
@@ -55,6 +58,7 @@ const FEATURE_COMPONENTS = {
5558
hash: HashGenerator,
5659
basicauth: BasicAuthGenerator,
5760
crontab: CrontabGenerator,
61+
smtp: SmtpChecker,
5862
};
5963

6064
/**
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import React, { useState } from 'react';
2+
import { ExternalLink, RefreshCw } from 'lucide-react';
3+
4+
const SmtpChecker = () => {
5+
const [key, setKey] = useState(0);
6+
7+
const refreshIframe = () => {
8+
setKey(prev => prev + 1);
9+
};
10+
11+
return (
12+
<div className="flex flex-col h-full w-full bg-slate-900 rounded-lg border border-slate-800 overflow-hidden shadow-sm">
13+
<div className="flex items-center justify-between px-4 py-3 border-b border-slate-800 bg-slate-900/50">
14+
<div className="flex items-center gap-2">
15+
<h2 className="text-sm font-medium text-slate-200">SMTP Checker</h2>
16+
<span className="text-xs text-slate-500 font-mono hidden sm:inline-block">smtp-checker.runany.dev</span>
17+
</div>
18+
<div className="flex items-center gap-2">
19+
<button
20+
onClick={refreshIframe}
21+
className="p-1.5 text-slate-400 hover:text-slate-100 hover:bg-slate-800 rounded-md transition-colors"
22+
title="Reload Frame"
23+
>
24+
<RefreshCw size={14} />
25+
</button>
26+
<a
27+
href="https://smtp-checker.runany.dev"
28+
target="_blank"
29+
rel="noopener noreferrer"
30+
className="p-1.5 text-slate-400 hover:text-slate-100 hover:bg-slate-800 rounded-md transition-colors"
31+
title="Open in new tab"
32+
>
33+
<ExternalLink size={14} />
34+
</a>
35+
</div>
36+
</div>
37+
38+
<div className="flex-1 w-full bg-white relative">
39+
<iframe
40+
key={key}
41+
src="https://smtp-checker.runany.dev"
42+
className="absolute inset-0 w-full h-full border-0"
43+
title="SMTP Checker"
44+
allow="clipboard-write"
45+
loading="lazy"
46+
/>
47+
</div>
48+
</div>
49+
);
50+
};
51+
52+
export default SmtpChecker;

src/features/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ export { default as PasswordGenerator } from './PasswordGenerator';
77
export { default as HashGenerator } from './HashGenerator';
88
export { default as BasicAuthGenerator } from './BasicAuthGenerator';
99
export { default as CrontabGenerator } from './CrontabGenerator';
10+
export { default as SmtpChecker } from './SmtpChecker/SmtpChecker';
11+

0 commit comments

Comments
 (0)