import type { Router } from "@remix-run/router";
import dayjs from "dayjs";
import "dayjs/locale/zh-tw";
import ReactDOM from 'react-dom/client';
import { RouterProvider, createHashRouter } from "react-router-dom";
import App from './App.tsx';
import Play from "./Play.tsx";
import './index.css';

dayjs.locale("zh-tw");

const hashRouter: Router = createHashRouter([
	{
		path: "/",
		element: <App />,
	},
	{
		path: "/home/:id",
		element: <App />,
	},
	{
		path: "/play/:id",
		element: <Play />,
	},
]);

ReactDOM.createRoot(document.getElementById('root')!).render(
	<RouterProvider router={hashRouter} />
)
