Merge branch 'main' into feature/add-language
This commit is contained in:
commit
c2b7a9ccf3
5 changed files with 48 additions and 30 deletions
|
@ -1,22 +1,23 @@
|
|||
import { A } from "@solidjs/router";
|
||||
import LandingImage from '../../assets/landing.svg'
|
||||
import css from "./index.module.css";
|
||||
|
||||
import { useNavigate } from "@solidjs/router";
|
||||
import { createEffect } from "solid-js";
|
||||
import { useFiles } from "~/features/file";
|
||||
|
||||
export default function Index() {
|
||||
return (
|
||||
<main class={css.main}>
|
||||
<LandingImage />
|
||||
const navigate = useNavigate();
|
||||
const files = useFiles();
|
||||
|
||||
<h1>Hi, welcome!</h1>
|
||||
<b>Lets get started</b>
|
||||
createEffect(() => {
|
||||
const loading = files.loading();
|
||||
const root = files.root();
|
||||
|
||||
<ul>
|
||||
<li><A href="/edit">Start editing</A></li>
|
||||
{/* <li><A href="/experimental">Try new features</A></li> */}
|
||||
<li><A href="/instructions">Read the instructions</A></li>
|
||||
<li><A href="/about">About this app</A></li>
|
||||
</ul>
|
||||
</main>
|
||||
);
|
||||
if (loading) {
|
||||
return;
|
||||
}
|
||||
|
||||
navigate(root !== undefined ? '/edit' : '/welcome');
|
||||
});
|
||||
|
||||
return <section style="display: grid; place-content: center;">
|
||||
<span>Loading, one moment please</span>
|
||||
</section>;
|
||||
}
|
||||
|
|
19
src/routes/(editor)/welcome.tsx
Normal file
19
src/routes/(editor)/welcome.tsx
Normal file
|
@ -0,0 +1,19 @@
|
|||
import { A } from "@solidjs/router";
|
||||
import LandingImage from '../../assets/landing.svg'
|
||||
import css from "./welcome.module.css";
|
||||
|
||||
export default function Welcome() {
|
||||
return <main class={css.main}>
|
||||
<LandingImage />
|
||||
|
||||
<h1>Hi, welcome!</h1>
|
||||
<b>Lets get started</b>
|
||||
|
||||
<ul>
|
||||
<li><A href="/edit">Start editing</A></li>
|
||||
{/* <li><A href="/experimental">Try new features</A></li> */}
|
||||
<li><A href="/instructions">Read the instructions</A></li>
|
||||
<li><A href="/about">About this app</A></li>
|
||||
</ul>
|
||||
</main>;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue