Skip to content

Commit

Permalink
change script order
Browse files Browse the repository at this point in the history
  • Loading branch information
kamicut committed May 30, 2024
1 parent 5a0dcd5 commit 60361e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<title>FIDE Player Selector</title>
</head>
<body class="bg-gray-100 flex items-center justify-center min-h-screen p-4 sm:p-8">
<div x-data="fideSelector(handleClick)" x-init="fetchCountries()" class="bg-white p-4 sm:p-8 rounded shadow-md w-full max-w-4xl">
<div x-data="fideSelector(player => handleClick(player))" x-init="fetchCountries()" class="bg-white p-4 sm:p-8 rounded shadow-md w-full max-w-4xl">
<form>
<!-- Country Selector -->
<div class="mb-4">
Expand Down Expand Up @@ -99,12 +99,12 @@
</button>
</div>
</div>
<script src="main.js"></script>
<script>
function handleClick(player) {
const fideUrl = `https://ratings.fide.com/profile/${player.fideid}`;
window.open(fideUrl, '_blank');
}
</script>
<script src="main.js"></script>
</body>
</html>

0 comments on commit 60361e0

Please sign in to comment.