Skip to content

Commit

Permalink
Remove final legacy online stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniils Petrovs committed Jun 9, 2024
1 parent 6165049 commit 96a3b3c
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 27 deletions.
File renamed without changes.
9 changes: 0 additions & 9 deletions src/lib/components/Navigation.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,6 @@
<Icon src={UserCircle} theme="solid" class="color-gray-900" size="20" />Profile
</a>
</li>
<li>
<a
href="/leaderboard"
on:click={() => {
drawerToggle.checked = false;
}}>
<Icon src={Trophy} theme="solid" class="color-gray-900" size="20" />Leaderboard
</a>
</li>
<li>
<a
href="/about"
Expand Down
2 changes: 1 addition & 1 deletion src/routes/leaderboard/+page.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fetchLeaderboard } from '../../client';
import { fetchLeaderboard } from '../../legacy-client';
import type { PageLoad } from './$types';

export const load = (async () => {
Expand Down
10 changes: 0 additions & 10 deletions src/routes/profile/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script lang="ts">
import { fade } from 'svelte/transition';
import { onMount } from 'svelte';
import { setNickname } from '../../client';
import { setToast, nickname } from '../../store';
import { TOAST_TYPE } from '../../custom';
Expand Down Expand Up @@ -30,15 +29,6 @@
$nickname = newNicknameValue;
if (userToken !== '' && userToken !== null) {
const res = await setNickname(userToken, newNicknameValue);
if (res.errors) {
console.log(res.errors);
setToast({
type: TOAST_TYPE.ERROR,
message: 'Nickname invalid'
});
return;
}
setToast({
type: TOAST_TYPE.SUCCESS,
message: 'Nickname updated successfully'
Expand Down
7 changes: 0 additions & 7 deletions src/routes/scanner/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import { sha1 } from '../../crypto';
import { expectedStamps } from '../../const';
import { TOAST_TYPE, SCANNER_STATE, type ScannerState } from '../../custom';
import { updateScore } from '../../client';
import { Icon } from '@steeze-ui/svelte-icon';
import { Ticket, QrCode, StopCircle } from '@steeze-ui/heroicons';
Expand Down Expand Up @@ -53,12 +52,6 @@
let collectedStamps = collectedStampCount();
try {
if ($userToken) updateScore($userToken, collectedStamps);
} catch (e) {
console.error("Can't update score!");
}
setToast({
type: TOAST_TYPE.SUCCESS,
message: 'Stamp Saved!'
Expand Down

0 comments on commit 96a3b3c

Please sign in to comment.