Skip to content

Commit

Permalink
fix: replace 2023 with 2024 (#377)
Browse files Browse the repository at this point in the history
* fix: replace 2023 with 2024

* fix: teams where commented and discord link was wrong

* fix: when updating item, sending null instead of ""

* Update Header.tsx

* fix: orga users could not buy a ticket

* fix: modif CGV and patch fail

* fix: env

* Fix: aucun achat title

---------

Co-authored-by: Antoine Dufils <[email protected]>
Co-authored-by: Teddy Roncin <[email protected]>
Co-authored-by: Antoine D <[email protected]>
Co-authored-by: Noé Landré <[email protected]>
Co-authored-by: Remi-pcn <[email protected]>
  • Loading branch information
6 people authored Sep 12, 2024
1 parent 86e6936 commit 2291889
Show file tree
Hide file tree
Showing 13 changed files with 134 additions and 77 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2023 UNG
Copyright (c) 2019-2024 UNG

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion src/app/(dashboard)/dashboard/account/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const Account = () => {
const data = window.URL.createObjectURL(response);
const link = document.createElement('a');
link.href = data;
link.download = 'Billet UTT Arena 2023.pdf';
link.download = 'Billet UTT Arena 2024.pdf';
link.click();
};

Expand Down
2 changes: 1 addition & 1 deletion src/app/(dashboard)/dashboard/purchases/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const Purchases = () => {
{carts.length ? (
displayCarts
) : (
<Title level={4} className={styles.primaryTitle}>
<Title type={3} level={3} className={styles.primaryTitle} align="center">
Aucun achat
</Title>
)}
Expand Down
6 changes: 2 additions & 4 deletions src/app/(dashboard)/dashboard/shop/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import SupplementList from '@/components/dashboard/SupplementList';
import Cart from '@/components/dashboard/Cart';
import { getTicketPrice } from '@/modules/users';
import { useAppDispatch, useAppSelector } from '@/lib/hooks';
import { AttendantInfo, CartItem, Item, Permission, User, UserAge, UserType } from '@/types';
import { AttendantInfo, CartItem, Item, User, UserAge, UserType } from '@/types';
import { IconName } from '@/components/UI/Icon';
import { setRedirect } from '@/modules/redirect';
import { getItemImageLink } from '@/utils/uploadLink';
Expand Down Expand Up @@ -299,9 +299,7 @@ const Shop = () => {

// Hide the places section if user can't buy any places
const placesSectionVisible =
(!isPlaceInCart && !user.permissions.includes(Permission.orga)) ||
(user.age === UserAge.child && !hasAttendant) ||
teamMembersWithoutTicket.length;
!isPlaceInCart || (user.age === UserAge.child && !hasAttendant) || teamMembersWithoutTicket.length;

return (
<div id="dashboard-shop" className={styles.dashboardShop}>
Expand Down
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const metadata: Metadata = {
keywords: [
'UTT',
'UTT Arena',
'UTT Arena 2023',
'UTT Arena 2024',
'esport',
'e-sport',
'gaming',
Expand Down
165 changes: 113 additions & 52 deletions src/app/legal/page.tsx

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/app/tournaments/[id]/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ export function TournamentInformation({ tournamentId, animate = true }: { tourna
name: team.name,
// Commented for security reasons
//
// players: team.players.map((player) => (
// <>
// {player.username}
// <br />
// </>
// )),
players: team.players.map((player) => (
<>
{player.username}
<br />
</>
)),
}
: {
players: team.players.map((player) => (
Expand Down
2 changes: 1 addition & 1 deletion src/app/tournaments/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import ScrollUp from '@/components/UI/ScrollUp';
import LayoutTop from '@/app/tournaments/layout-top';

export const metadata: Metadata = {
title: 'Tournois - UTT Arena 2023 - 1, 2 et 3 décembre 2023',
title: 'Tournois - UTT Arena 2024 - 6, 7 et 8 décembre 2024',
};

const TournamentsLayout = ({ children }: { children: React.ReactNode }) => {
Expand Down
4 changes: 1 addition & 3 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ export default function Footer() {
<Link href={'/legal'}>
<Button>Mentions légales</Button>
</Link>
{/*
<Link href={'/legal#CGV'}>
<Button>Conditions générales de ventes</Button>
</Link>
*/}
</div>
<div className={styles.right}>
<h3>Plus d'informations</h3>
Expand All @@ -40,7 +38,7 @@ export default function Footer() {
<Button>FAQ</Button>
</Link>
<div className={styles.socials}>
<Link href={'https://discord.gg/WhxZwKU'} aria-label="Discord" rel="noopener" passHref={true}>
<Link href={'https://discord.gg/tkRrVZYXmT'} aria-label="Discord" rel="noopener" passHref={true}>
<Icon name={IconName.Discord} fill={true} />
</Link>
<Link href={'https://www.twitch.tv/uttarena'} aria-label="Twitch" rel="noopener" passHref={true}>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ export default function Header({
<header ref={header as MutableRefObject<HTMLDivElement>} id="header" className={styles.header}>
<div className={styles.content}>
<Link href="/">
<Image src={logo.src} width={72} height={61.5} alt="Logo UA23" />
<Image src={logo.src} width={72} height={61.5} alt="Logo UA24" />
{/* For SEO */}
<Title level={1} className={styles.hidden}>
UTT Arena 2023
UTT Arena 2024
</Title>
</Link>
<nav>
Expand Down
6 changes: 3 additions & 3 deletions src/components/dashboard/ItemModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ const ItemModal = ({
attribute: attribute ? attribute : null,
price: price ?? 0,
reducedPrice: reducedPrice ?? 0,
availableFrom: startDate ?? '',
availableUntil: endDate ?? '',
availableFrom: startDate ? startDate : null,
availableUntil: endDate ? endDate : null,
// we update the stock through a difference between the current stock and the quantity in order to avoid conflicts if an order is made at the same time
left: quantity! - item!.stock! ?? item!.stock!,
infos: infos ?? '',
infos: infos ? infos : null,
display: display ?? false,
} as AdminItem;

Expand Down
2 changes: 1 addition & 1 deletion src/modules/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export const updateItem =
availableFrom: item.availableFrom,
availableUntil: item.availableUntil,
display: item.display.toString(),
image: image ? true : false,
image: !!image,
});

if (result && image) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export const apiUrl = () => process.env.NEXT_PUBLIC_API_URL || '';
export const uploadsUrl = () => process.env.NEXT_PUBLIC_UPLOADS_URL || '';
// export const googleAnalyticsId = () => process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID || '';
export const googleVerification = () => process.env.NEXT_PUBLIC_GOOGLE_VERIFICATION || '';
export const stripePublicKey = () => process.env.NEXT_PUBLIC_STRIPE_PUBLIC_KEY || '';
export const stripePublicKey = () => `${process.env.NEXT_PUBLIC_STRIPE_PUBLIC_KEY}` || '';

0 comments on commit 2291889

Please sign in to comment.