Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
import axios from "axios";
import { FormEvent, useEffect, useState } from "react";
import toast, { Toaster } from 'react-hot-toast';
const localOptionsDefault = [

type LocalPaymentOption = {
operator: string;
shortNumber: string;
isSelected: boolean;
}

const localOptionsDefault: LocalPaymentOption[] = [

{
operator: "zaad",
Expand Down Expand Up @@ -171,12 +178,12 @@ export default function Home() {
<h2 className="text-xl mb-2">Local Payment Options</h2>

{
localPaymentOptions.map((option, index) => (
localPaymentOptions.map(({operator, isSelected}, index) => (
<div
onClick={() => handlePaymentClickOption(index)}

className={`w-full bg-gray-50 rounded border-2 ${option.isSelected && "border-blue-500"} p-2 my-2 cursor-pointer`} key={option.operator}>
<h2>{option.operator}</h2>
className={`w-full bg-gray-50 rounded border-2 ${isSelected && "border-blue-500"} p-2 my-2 cursor-pointer`} key={operator}>
<h2>{operator}</h2>
</div>
))
}
Expand Down
18 changes: 10 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.