aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/src/App.svelte
blob: ee4d8948611fcdbfdf9383c13a75e236bf7b148c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<script lang="ts">
  import DbInput from "./DBInput.svelte";
  import Login from "./Login.svelte";
  import Books from "./Books.svelte";
  import AddBook from "./AddBook.svelte";
  let whereami = "check-db";
  // whereami = "books";
  let ebook = {};
  // whereami = "books";

  $: {
    console.log(whereami);
  }
</script>

{#if whereami === "check-db"}
  <DbInput bind:whereami />
{:else if whereami === "login"}
  <Login bind:whereami />
{:else if whereami === "books"}
  <Books bind:whereami bind:ebook />
{:else if whereami === "add-book"}
  <AddBook bind:whereami mode="add" ebook={null} />
{:else if whereami === "edit-book"}
  <AddBook bind:whereami mode="edit" bind:ebook />
{/if}

<style>
  :root {
    font-family: "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell;
  }
</style>