init tanstack
This commit is contained in:
13
src/data/demo.punk-songs.ts
Normal file
13
src/data/demo.punk-songs.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { createServerFn } from '@tanstack/react-start'
|
||||
|
||||
export const getPunkSongs = createServerFn({
|
||||
method: 'GET',
|
||||
}).handler(async () => [
|
||||
{ id: 1, name: 'Teenage Dirtbag', artist: 'Wheatus' },
|
||||
{ id: 2, name: 'Smells Like Teen Spirit', artist: 'Nirvana' },
|
||||
{ id: 3, name: 'The Middle', artist: 'Jimmy Eat World' },
|
||||
{ id: 4, name: 'My Own Worst Enemy', artist: 'Lit' },
|
||||
{ id: 5, name: 'Fat Lip', artist: 'Sum 41' },
|
||||
{ id: 6, name: 'All the Small Things', artist: 'blink-182' },
|
||||
{ id: 7, name: 'Beverly Hills', artist: 'Weezer' },
|
||||
])
|
||||
Reference in New Issue
Block a user