Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test #31

Merged
merged 2 commits into from
Oct 23, 2024
Merged

Test #31

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
Binary file modified backend/app/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file modified backend/app/__pycache__/config.cpython-312.pyc
Binary file not shown.
Binary file modified backend/app/routes/__pycache__/event_routes.cpython-312.pyc
Binary file not shown.
104 changes: 104 additions & 0 deletions frontend/package-lock.json

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

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"react-spinners": "^0.14.1",
"slick-carousel": "^1.8.1",
"web-vitals": "^2.1.4",
"xlsx": "^0.18.5",
"yup": "^1.4.0",
"zustand": "^5.0.0-rc.2"
},
Expand Down
17 changes: 6 additions & 11 deletions frontend/src/components/AddGame/AddGame.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import React, { useState, useEffect } from "react";
import { useFormik } from "formik";
import * as Yup from "yup";
import { toast, Toaster } from "react-hot-toast";
import { createAdminGame, updateEvent } from "../../helper/adminhelper";
import { fetchCountries, fetchAllGames } from "../../helper/helper";
import { createAdminGame, updateGame } from "../../helper/adminhelper";
import { RxCross2 } from "react-icons/rx";
import ClipLoading from "../ClipLoading/ClipLoading";

Expand All @@ -24,7 +23,7 @@ const AddGame = ({ onClose, editEvent, item, fetchEvents, resetPage }) => {
const formik = useFormik({
initialValues: editEvent
? {
game: item.game || "",
game: item.gameName || "",
genre: item.genre || "",
}
: {
Expand All @@ -41,8 +40,8 @@ const AddGame = ({ onClose, editEvent, item, fetchEvents, resetPage }) => {
setLoading(true);
if (editEvent) {
try {
await updateEvent(item.eventid, values, token);
toast.success("Event updated successfully");
await updateGame(item.gameId, values, token);
toast.success("Game updated successfully");
setTimeout(() => {
fetchEvents();
toast.dismiss();
Expand All @@ -51,7 +50,6 @@ const AddGame = ({ onClose, editEvent, item, fetchEvents, resetPage }) => {
onClose();
}, 1000);
} catch (error) {
console.error("Error:", error);
toast.error("Game Update Failed");
setTimeout(() => {
toast.dismiss();
Expand All @@ -70,7 +68,6 @@ const AddGame = ({ onClose, editEvent, item, fetchEvents, resetPage }) => {
onClose();
}, 1000);
} catch (error) {
console.error("Error:", error);
toast.error("Game Adding Failed");
setTimeout(() => {
toast.dismiss();
Expand All @@ -84,7 +81,7 @@ const AddGame = ({ onClose, editEvent, item, fetchEvents, resetPage }) => {
return (
<div className="fixed inset-0 flex items-center justify-center z-50 bg-black bg-opacity-50">
<Toaster position="top-center" />
<div className="relative flex flex-col bg-background xl:px-12 p-6 pt-16 rounded-lg w-80 xl:w-3/12 overflow-y-auto">
<div className="relative flex flex-col bg-background xl:px-12 p-6 pt-16 rounded-lg w-80 xl:w-1/4 overflow-y-auto">
<div className="absolute top-0 left-0 w-full flex justify-center items-center p-4 bg-custom_white z-10">
<p className="text-custom_black text-xl sm:text-4xl font-bold">
{editEvent ? "Update Game" : "Create New Game"}
Expand Down Expand Up @@ -139,9 +136,7 @@ const AddGame = ({ onClose, editEvent, item, fetchEvents, resetPage }) => {
formik.setFieldValue("genre", e.target.value)
}
className="custom-radio custom-radio-label"
// checked={formik.values.game_names.includes(
// game.gameName
// )}
checked={formik.values.genre.includes(game)}
/>
<label
htmlFor={`game-${game}`}
Expand Down
16 changes: 8 additions & 8 deletions frontend/src/components/Footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ function Footer() {
<div className="mx-auto px-8 grid grid-cols-1 md:grid-cols-2 gap-8">
{/* Logo and Description (Taking Half the Space) */}
<div className="col-span-1 md:col-span-1 pr-8">
<img src={logo} alt="InGame Esports Logo" className="w-32 mb-4" />
<img src={logo} alt="ArenaSync Esports Logo" className="w-32 mb-4" />
<p className="text-sm text-gray-300">
ingame.gg by InGame Esports is a tournament platform for all South
ArenaSync by ArenaSync Esports is a tournament platform for all South
Asian Esports athletes. The platform will host events across many
Esports titles, and cater to both small-scale community tournaments
and large-scale national-level championships. Current countries
Expand All @@ -18,11 +18,11 @@ function Footer() {
<p className="text-sm text-gray-300 mt-2">
For support join our Discord at
<a
href="https://ingame.gg/discord"
href="https://arenasync.com/discord"
className="text-blue-500 hover:underline"
>
{" "}
https://ingame.gg/discord
https://arenasync.com/discord
</a>
</p>
</div>
Expand Down Expand Up @@ -116,7 +116,7 @@ function Footer() {
<h4 className="text-blue-500 border-l-4 border-blue-500 pl-2 mb-4 font-bold">
CONTACT
</h4>
<p className="text-sm text-gray-300 mb-2">e: support@ingame.gg</p>
<p className="text-sm text-gray-300 mb-2">e: support@arenasync.com</p>
<p className="text-sm text-gray-300">T: +94 76 404 7529</p>
</div>
</div>
Expand All @@ -125,15 +125,15 @@ function Footer() {
{/* Bottom Footer */}
<div className="flex bg-gray-800 text-center justify-between items-center w-full py-4 mt-8 px-8">
<p className="text-sm text-gray-400">
ArenaSL.LK © 2024 | Your home for eSports and Digital Entertainment |
ArenaSync.com © 2024 | Your home for eSports and Digital Entertainment |
v0.0.1
</p>
<p className="text-sm text-gray-400 mt-1">
{/* <p className="text-sm text-gray-400 mt-1">
Solution by{" "}
<a href="https://teamr.gg" className="text-blue-500 hover:underline">
weyora
</a>
</p>
</p> */}
</div>
</footer>
);
Expand Down
Loading
Loading