Untitled

 avatar
unknown
plain_text
a month ago
3.6 kB
4
Indexable
export default function RedeemCodeGenerator() { const generateCode = () => { const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; let code = ""; for (let i = 0; i < 12; i++) { code += chars[Math.floor(Math.random() * chars.length)]; if ((i + 1) % 4 === 0 && i !== 11) code += "-"; } return code; };

const codes = Array.from({ length: 5 }, () => generateCode());

return ( <div className="min-h-screen bg-gray-100 flex items-center justify-center p-6"> <div className="bg-white rounded-3xl shadow-xl p-8 max-w-md w-full text-center"> <h1 className="text-3xl font-bold mb-4">Redeem Code Generator</h1> <p className="text-gray-600 mb-6"> Demo app that creates random-style codes for fun/testing. </p>

<div className="space-y-3">
      {codes.map((code, index) => (
                <div
                          key={index}
                                    className="bg-gray-200 rounded-2xl p-3 text-lg font-mono"
                                            >
                                                      {code}
                                                              </div>
      ))}
          </div>

              <button
                    onClick={() => window.location.reload()}
                          className="mt-6 px-6 py-3 bg-black text-white rounded-2xl hover:scale-105 transition"
                              >
                                    Generate New Codes
                                        </button>

                                            <p className="text-xs text-gray-500 mt-5">
                                                  These are not official or working game redeem codes.
                                                      </p>
                                                        </div>
                                                        </div>

); }export default function RedeemCodeGenerator() { const generateCode = () => { const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; let code = ""; for (let i = 0; i < 12; i++) { code += chars[Math.floor(Math.random() * chars.length)]; if ((i + 1) % 4 === 0 && i !== 11) code += "-"; } return code; };

const codes = Array.from({ length: 5 }, () => generateCode());

return ( <div className="min-h-screen bg-gray-100 flex items-center justify-center p-6"> <div className="bg-white rounded-3xl shadow-xl p-8 max-w-md w-full text-center"> <h1 className="text-3xl font-bold mb-4">Redeem Code Generator</h1> <p className="text-gray-600 mb-6"> Demo app that creates random-style codes for fun/testing. </p>

<div className="space-y-3">
      {codes.map((code, index) => (
                <div
                          key={index}
                                    className="bg-gray-200 rounded-2xl p-3 text-lg font-mono"
                                            >
                                                      {code}
                                                              </div>
      ))}
          </div>

              <button
                    onClick={() => window.location.reload()}
                          className="mt-6 px-6 py-3 bg-black text-white rounded-2xl hover:scale-105 transition"
                              >
                                    Generate New Codes
                                        </button>
                                                  These are not official or working game redeem codes.
                                                      </p>
                                                        </div>
                                                        </div>

); }
      ))})}
      ))})}
Editor is loading...
Leave a Comment