Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #96 from isd-sgcu/dev
Browse files Browse the repository at this point in the history
Deploy Production 🔥
  • Loading branch information
betich authored Aug 4, 2023
2 parents 2a2b432 + 60aaf6d commit d8c029d
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 41 deletions.
2 changes: 1 addition & 1 deletion src/components/Game/lib/GameContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function ChoicesButton({
);
} else if (choices.length === 2) {
return (
<div className="mx-auto my-10 flex content-center text-sm ">
<div className="mx-auto my-10 flex flex-col justify-center gap-4 text-sm">
<Button
content={choices[0].message}
onClick={() => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Game/lib/Scene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ const GameScene: Scene = {
Game42: {
bg: '42',
message: (
<p className="text-black">
<p className="mt-48 text-black">
ขอบคุณเทคโนโลยีล้ำสมัย
<br />
ที่ทำให้การอาบน้ำเป็นไปได้ในยานอวกาศ
Expand Down
2 changes: 1 addition & 1 deletion src/components/WalkRally/Home/components/Accessibility.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Accessibility = () => {
<Link href="/scan">
<Button color="green">
<CameraIcon className="mx-2 h-6 w-6" />
<h1>Check-in / Check-out</h1>
<h1>Check-in / Check-out / Walk Rally</h1>
</Button>
</Link>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/context/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const AuthProvider = ({ children }: { children: ReactNode }) => {
user?.studentID &&
!user?.studentID.startsWith('66')
) {
router.push('/staff');
router.push('/only-107');
}
break;
case '/announce-baan':
Expand Down
26 changes: 20 additions & 6 deletions src/pages/scan.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,27 @@ function Scan() {

const checkIn = async (token: string) => {
try {
const { status } = await httpPost('/estamp/' + token, {});
if (status === 200) {
toast?.setToast('success', 'Check in successfully');
} else {
toast?.setToast('error', 'QR Code is invalid');
// check-in qr code
if (token === 'rpkm66-check-in') {
const { status } = await httpPost('/checkin/', {});
if (status === 200) {
toast?.setToast('success', 'Check-in successfully');
} else {
toast?.setToast('error', 'QR Code is invalid');
}
router.push('/walk-rally');
}

// estamp qr code
else {
const { status } = await httpPost('/estamp/' + token, {});
if (status === 200) {
toast?.setToast('success', 'Successfully received E-Stamp');
} else {
toast?.setToast('error', 'QR Code is invalid');
}
router.push('/walk-rally');
}
router.push('/walk-rally');
} catch {
toast?.setToast('error', 'There was an error');
}
Expand Down
File renamed without changes.
31 changes: 0 additions & 31 deletions src/pages/staff/index.tsx

This file was deleted.

0 comments on commit d8c029d

Please sign in to comment.