Skip to content

Commit

Permalink
fix: uncomment code-code generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Raspincel committed Sep 6, 2024
1 parent 20abcf2 commit e85170f
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions src/components/ActivationsPages/GameActivationPlayLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export default function GameActivationPlayLayout({
repeatedTries.current += 1;

if (randomTimes.includes(repeatedTries.current)) {
console.log("includes", randomTimes, repeatedTries.current);
try {
const user = await getUserData(
JSON.parse(localStorage.getItem(USERDATA_KEY) as string)
Expand All @@ -78,21 +77,20 @@ export default function GameActivationPlayLayout({
timesRevoked: user?.timesRevoked! + 1,
});

// const response = await fetch(
// "https://codecodes-api-78be231ef650.herokuapp.com/token/partner",
// {
// method: "POST",
// headers: {
// "x-partnerApiKey": "aa7da574-3ab2-4911-b2af-73afc22df46f",
// },
// }
// );

// const {
// data: { code },
// } = await response.json();

const code = "123456";
const response = await fetch(
"https://codecodes-api-78be231ef650.herokuapp.com/token/partner",
{
method: "POST",
headers: {
"x-partnerApiKey": "aa7da574-3ab2-4911-b2af-73afc22df46f",
},
}
);

const {
data: { code },
} = await response.json();

toast(`Você descobriu um Code-Code! Anote: ${code}`, {
autoClose: 15000,
position: "top-center",
Expand Down

0 comments on commit e85170f

Please sign in to comment.