Skip to content

Commit

Permalink
Update index.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
ircfspace committed Mar 2, 2024
1 parent 744068a commit c5d807d
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,6 @@ const Home: NextPage = () => {
/>
</label>
<div className="clearfix"></div>
{ typeof ipInfo !== "undefined" && ipInfo.countryCode !== 'IR' && (
<>
<div className="alert alert-danger text-center">
Notice: Please turn off your vpn!
</div>
</>
)}
{/*<div className="alert alert-info">
<UserIP
ip={ipInfo.ipAddress}
Expand All @@ -148,20 +141,29 @@ const Home: NextPage = () => {
}
/>
</div>*/}
<div className="clearfix"></div>
{!isRunning ? (
<button className="btn btn-block btn-primary" onClick={startScan}>
Start Scan <PlayIcon className="inline-block h-6 w-6 pb-0.5" />
</button>
) : (
<button
className="btn btn-block btn-warning"
type="button"
onClick={stopScan}
disabled={scanState === "stopping"}
>
Stop Scan <StopIcon className="inline-block h-6 w-6 pb-0.5" />
</button>
{ typeof ipInfo !== "undefined" && ipInfo.countryCode !== 'IR' ? (
<>
<div className="alert alert-danger text-center">
Please turn off your VPN!
</div>
</>
): (
<>
{!isRunning ? (
<button className="btn btn-block btn-primary" onClick={startScan}>
Start Scan <PlayIcon className="inline-block h-6 w-6 pb-0.5" />
</button>
) : (
<button
className="btn btn-block btn-warning"
type="button"
onClick={stopScan}
disabled={scanState === "stopping"}
>
Stop Scan <StopIcon className="inline-block h-6 w-6 pb-0.5" />
</button>
)}
</>
)}
<div className="clearfix"></div>
<hr />
Expand Down

0 comments on commit c5d807d

Please sign in to comment.