Miao-Yunzai/routes.tsx

30 lines
667 B
TypeScript
Raw Normal View History

2024-06-11 22:10:46 +08:00
import React from "react"
2024-06-16 00:21:18 +08:00
import Hello from "./views/hello.tsx"
2024-06-16 18:11:37 +08:00
import Music from './views/music.tsx'
import { createRequire } from 'module'
const require = createRequire(import.meta.url)
const image: string = require('./resources/example.png')
const movies = [
2024-06-15 11:18:45 +08:00
{
id: 0,
2024-06-16 18:11:37 +08:00
image: image,
2024-06-15 11:18:45 +08:00
title: 'Prognosis Negative',
starRating: '2.66',
rating: 'PG-13',
year: '2021',
genre: 'Comedy',
runtime: '1h 46m',
cast: 'Simon Pegg, Zach Galifianakis '
}
]
2024-06-16 18:11:37 +08:00
const Config = [
2024-06-15 11:18:45 +08:00
{
2024-06-16 18:11:37 +08:00
url: "/hello",
2024-06-15 11:18:45 +08:00
element: <Hello data={{ name: "word" }} movies={movies} />
},
{
2024-06-16 00:21:18 +08:00
url: "/music",
2024-06-16 18:11:37 +08:00
element: <Music />
2024-06-11 22:10:46 +08:00
}
]
export default Config