Skip to content
Source
Sign inSign up
TanStack/router

test(solid-start): add missing custom-basepath tests #5641

Mergedbirkskyum(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/5641/headmerged by birkskyum(GitHub profile, opens in a new tab)

Showing 6 changed files with 49 additions and 3 deletions (loading 2).

x
0 of 6 viewed, 6 left
e2e/solid-start/custom-basepath/src/routeTree.gen.tsModified
View file
32 additions and 0 deletionse2e/solid-start/custom-basepath/src/routes/logout.tsxAdded
View file
@@ -0,0 +1,32 @@
+import { createFileRoute, redirect } from '@tanstack/solid-router'
+import { createServerFn } from '@tanstack/solid-start'
+​
+const logoutFn = createServerFn({
+ method: 'POST',
+}).handler(async () => {
+ // do logout stuff here
+ throw redirect({
+ to: '/',
+ })
+})
+​
+export const Route = createFileRoute('/logout')({
+ component: Home,
+})
+​
+function Home() {
+ return (
+ <div class="p-2">
+ <h3>Logout Page</h3>
+ <p>
+ This form tests that server function URLs correctly include the app's