svelte-guard-history-router
Advanced tools
Comparing version 2.1.1 to 2.1.4
{ | ||
"name": "svelte-guard-history-router", | ||
"version": "2.1.1", | ||
"version": "2.1.4", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -29,6 +29,4 @@ [![Svelte v3](https://img.shields.io/badge/svelte-v3-orange.svg)](https://svelte.dev) | ||
import { BaseRouter, route, Guard } from 'svelte-guard-history-router'; | ||
import Categories from "./Categories.svelte"; | ||
import Article from "./Article.svelte"; | ||
import Category from "./Category.svelte"; | ||
import Article from "./Article.svelte"; | ||
import Articles from "./Articles.svelte"; | ||
import Login from "./Login.svelte"; | ||
@@ -48,4 +46,2 @@ | ||
[ | ||
route("*", Home), | ||
route("/login", Login), | ||
route("/article/:article", sessionGuard, Article), | ||
@@ -60,16 +56,11 @@ route("/category/:category", sessionGuard, Category) | ||
<script> | ||
import { | ||
Router, | ||
Outlet, | ||
link, | ||
active | ||
} from "svelte-guard-history-router"; | ||
import { Router, Route, Outlet } from "svelte-guard-history-router"; | ||
import About from "./About.svelte"; | ||
import Home from "./Home.svelte"; | ||
import Categories from "./Categories.svelte"; | ||
import Articles from "./Articles.svelte"; | ||
import { router } from "./main.mjs"; | ||
import { router, sessionGuard } from "./main.mjs"; | ||
</script> | ||
<Router> | ||
<Router {router}> | ||
<nav> | ||
@@ -79,9 +70,9 @@ <Route path="/" component={Home}>Router Example</Route> | ||
<li> | ||
<Route path="/about" component={About}>About</Route> | ||
<Route path="/about" component={Home}>About</Route> | ||
</li> | ||
<li> | ||
<Route path="/article" component={Articles}>Articles</Route> | ||
<Route path="/article" guards={sessionGuard} component={Home}>Articles</Route> | ||
</li> | ||
<li> | ||
<Route path="/category" component={Categories}>Categories</Route> | ||
<Route path="/category" guards={sessionGuard} component={Home}>Categories</Route> | ||
</li> | ||
@@ -88,0 +79,0 @@ </ul> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35057
620
455