Delete test2 page

This commit is contained in:
qowevisa 2024-11-30 16:41:45 +02:00
parent cae34b3f6e
commit 086654a1ec
2 changed files with 0 additions and 67 deletions

View File

@ -1,9 +0,0 @@
import type { PageServerLoad } from "./$types";
export const load: PageServerLoad = async ({ fetch }) => {
const response = await fetch("https://api.fin.qowevisa.click/api/authping");
return {
message: await response.json()
};
}

View File

@ -1,58 +0,0 @@
<script lang="ts">
import ColorPicker from "$lib/components/ColorPicker.svelte";
import { addSuccessToast } from "$lib/components/store";
import Toasts from "$lib/components/Toasts.svelte";
import { selectedDate } from "$lib/stores/dateStore";
let { data } = $props();
let selectedColor = $state("#ff0000");
function testNotification() {
console.log("Tested!");
addSuccessToast("Test string", false);
}
async function test2() {
addSuccessToast("Test string", false);
const resp = await fetch("https://api.fin.qowevisa.click/api/ping");
// const resp = await fetch("http://localhost:3000/api/ping");
if (resp.ok) {
console.log(await resp.json());
}
}
async function test3() {
console.log(data);
}
function handleColorChange(event: CustomEvent) {
selectedColor = event.detail;
}
</script>
<Toasts />
<p>{data.message.message}</p>
<div class="flex justify-center items-center min-h-screen bg-gray-100">
<button
onclick={testNotification}
class="w-1/6 bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 rounded-md focus:outline-none focus:ring focus:ring-blue-300"
>
Click Me!
</button>
<button
onclick={test2}
class="w-1/6 bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 rounded-md focus:outline-none focus:ring focus:ring-blue-300"
>
Click Me2!
</button>
<button
onclick={test3}
class="w-1/6 bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 rounded-md focus:outline-none focus:ring focus:ring-blue-300"
>
Click Me3!
</button>
<ColorPicker on:change={handleColorChange} borderRadius="50%" />
<p>Selected color: {selectedColor}</p>
<h1>Selected Date</h1>
<p>The date you selected in the navbar is: {$selectedDate}</p>
</div>