initial commit

This commit is contained in:
thislight 2024-07-14 20:28:44 +08:00
commit 5449e361d5
46 changed files with 8309 additions and 0 deletions

32
src/App.tsx Normal file
View file

@ -0,0 +1,32 @@
import { Route, Router } from "@solidjs/router";
import { ThemeProvider } from "@suid/material";
import { Component, lazy } from "solid-js";
import { useRootTheme } from "./material/mui.js";
import "./App.css"
const AccountSignIn = lazy(() => import("./accounts/SignIn.js"));
const AccountMastodonOAuth2Callback = lazy(() => import("./accounts/MastodonOAuth2Callback.js"))
const TimelineHome = lazy(() => import("./timelines/Home.js"))
const Routing: Component = () => {
return (
<Router>
<Route path="/" component={TimelineHome}></Route>
<Route path={"/accounts"}>
<Route path={"/sign-in"} component={AccountSignIn} />
<Route path={"/oauth2/mastodon"} component={AccountMastodonOAuth2Callback} />
</Route>
</Router>
);
};
const App: Component = () => {
const theme = useRootTheme();
return (
<ThemeProvider theme={theme()}>
<Routing />
</ThemeProvider>
);
};
export default App;