X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/895d4c51824f8e14b18dc11b2f12316a60a41646..152e6d847003cb0b2b4505f79531941dc98e9e95:/src/App.svelte

diff --git a/src/App.svelte b/src/App.svelte
index 7188333..54cad5d 100644
--- a/src/App.svelte
+++ b/src/App.svelte
@@ -1,12 +1,37 @@
 <script>
-  import * as jquery from 'jquery';
   import 'bootstrap/dist/css/bootstrap.css';
   import 'bootstrap/dist/js/bootstrap.bundle.js';
 
+  import { page, refresh_page } from './lib/stores.js';
+
   import Header from './components/Header.svelte';
   import Footer from './components/Footer.svelte';
- </script>
+  import ReportIssueModal from './components/ReportIssueModal.svelte';
+  import SearchPage from './pages/SearchPage.svelte';
+  import ReversePage from './pages/ReversePage.svelte';
+  import DetailsPage from './pages/DetailsPage.svelte';
+  import PolygonsPage from './pages/PolygonsPage.svelte';
+  import DeletablePage from './pages/DeletablePage.svelte';
+
+  $: view = $page.tab;
+
+  refresh_page();
+</script>
+
+<!-- deal with back-button and other user action -->
+<svelte:window on:popstate={refresh_page} />
 
 <Header/>
-<div id="main" />
+{#if view === 'search'}
+<SearchPage />
+{:else if view === 'reverse'}
+<ReversePage />
+{:else if view === 'details'}
+<DetailsPage />
+{:else if view === 'deletable'}
+<DeletablePage />
+{:else if view === 'polygons'}
+<PolygonsPage />
+{/if}
 <Footer/>
+<ReportIssueModal/>
