update deps, change matomo id to integer, change imports for css

This commit is contained in:
2026-10-13 21:42:10 +02:00
parent 24775870e2
commit 6cca16fa25
10 changed files with 909 additions and 1050 deletions
+1
View File
@@ -26,6 +26,7 @@ export function MatomoAnalytics() {
enableHeartBeatTimer: true,
cleanUrl: true,
disableCookies: true,
useProxy: false,
debug: import.meta.env.DEV,
});
}, [location.pathname, searchParams]);
+31 -31
View File
@@ -9,19 +9,14 @@
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
import { Route as rootRouteImport } from './routes/__root'
import { Route as ContactRouteImport } from './routes/contact'
import { Route as ChessboardRouteImport } from './routes/chessboard'
import { Route as CallbackRouteImport } from './routes/callback'
import { Route as IndexRouteImport } from './routes/index'
import { Route as CallbackRouteImport } from './routes/callback'
import { Route as ChessboardRouteImport } from './routes/chessboard'
import { Route as ContactRouteImport } from './routes/contact'
const ContactRoute = ContactRouteImport.update({
id: '/contact',
path: '/contact',
getParentRoute: () => rootRouteImport,
} as any)
const ChessboardRoute = ChessboardRouteImport.update({
id: '/chessboard',
path: '/chessboard',
const IndexRoute = IndexRouteImport.update({
id: '/',
path: '/',
getParentRoute: () => rootRouteImport,
} as any)
const CallbackRoute = CallbackRouteImport.update({
@@ -29,9 +24,14 @@ const CallbackRoute = CallbackRouteImport.update({
path: '/callback',
getParentRoute: () => rootRouteImport,
} as any)
const IndexRoute = IndexRouteImport.update({
id: '/',
path: '/',
const ChessboardRoute = ChessboardRouteImport.update({
id: '/chessboard',
path: '/chessboard',
getParentRoute: () => rootRouteImport,
} as any)
const ContactRoute = ContactRouteImport.update({
id: '/contact',
path: '/contact',
getParentRoute: () => rootRouteImport,
} as any)
@@ -71,18 +71,11 @@ export interface RootRouteChildren {
declare module '@tanstack/react-router' {
interface FileRoutesByPath {
'/contact': {
id: '/contact'
path: '/contact'
fullPath: '/contact'
preLoaderRoute: typeof ContactRouteImport
parentRoute: typeof rootRouteImport
}
'/chessboard': {
id: '/chessboard'
path: '/chessboard'
fullPath: '/chessboard'
preLoaderRoute: typeof ChessboardRouteImport
'/': {
id: '/'
path: '/'
fullPath: '/'
preLoaderRoute: typeof IndexRouteImport
parentRoute: typeof rootRouteImport
}
'/callback': {
@@ -92,11 +85,18 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof CallbackRouteImport
parentRoute: typeof rootRouteImport
}
'/': {
id: '/'
path: '/'
fullPath: '/'
preLoaderRoute: typeof IndexRouteImport
'/chessboard': {
id: '/chessboard'
path: '/chessboard'
fullPath: '/chessboard'
preLoaderRoute: typeof ChessboardRouteImport
parentRoute: typeof rootRouteImport
}
'/contact': {
id: '/contact'
path: '/contact'
fullPath: '/contact'
preLoaderRoute: typeof ContactRouteImport
parentRoute: typeof rootRouteImport
}
}
+2 -6
View File
@@ -10,7 +10,7 @@ import NotFoundView from "#/components/NotFoundView.tsx";
import { LichessUserProvider } from "#/context/LichessUserContext.tsx";
import Footer from "../components/Footer";
import Header from "../components/Header";
import appCss from "../styles.css?url";
import "../styles.css";
export const Route = createRootRoute({
head: () => ({
@@ -35,10 +35,6 @@ export const Route = createRootRoute({
},
],
links: [
{
rel: "stylesheet",
href: appCss,
},
{
rel: "icon",
href: "/favicon.svg",
@@ -89,10 +85,10 @@ function RootDocument({ children }: { children: ReactNode }) {
]}
/>
</LichessUserProvider>
<Scripts />
<Suspense fallback={null}>
<MatomoAnalytics />
</Suspense>
<Scripts />
</body>
</html>
);
+1 -1
View File
@@ -2,7 +2,7 @@ import { createServerFn } from "@tanstack/react-start";
import { env } from "#/env.ts";
export const sendToDiscord = createServerFn({ method: "POST" })
.inputValidator(
.validator(
(data: { name: string; email: string; subject: string; message: string }) =>
data,
)
+4 -4
View File
@@ -41,7 +41,7 @@ export const getSession = createServerFn({ method: "GET" }).handler(
);
export const setSession = createServerFn({ method: "POST" })
.inputValidator(SessionSchema)
.validator(SessionSchema)
.handler(async ({ data }) => {
setCookie("lichess-session", JSON.stringify(data), {
path: "/",
@@ -63,7 +63,7 @@ export const setSession = createServerFn({ method: "POST" })
});
export const getToken = createServerFn({ method: "POST" })
.inputValidator(z.object({ code: z.string() }))
.validator(z.object({ code: z.string() }))
.handler(async ({ data }) => {
const verifier = getCookie("lichess-oauth-verifier");
@@ -94,7 +94,7 @@ export const getToken = createServerFn({ method: "POST" })
});
export const getUser = createServerFn({ method: "POST" })
.inputValidator(z.object({ access_token: z.string() }))
.validator(z.object({ access_token: z.string() }))
.handler(async ({ data }) => {
const response = await fetch("https://lichess.org/api/account", {
headers: {
@@ -187,7 +187,7 @@ export const getUserStudies = createServerFn({ method: "POST" }).handler(
);
export const getStudyChapters = createServerFn({ method: "POST" })
.inputValidator((data: { studyId: string }) => data)
.validator((data: { studyId: string }) => data)
.handler(async ({ data }) => {
const session = await getSession();