Try force updates when navigating between named routes
This commit is contained in:
		| @@ -13,22 +13,20 @@ | |||||||
|   export async function load({ page: { params }, fetch }) { |   export async function load({ page: { params }, fetch }) { | ||||||
|     const { hostname } = params; |     const { hostname } = params; | ||||||
|  |  | ||||||
|  |     updated = unit?.hostname !== hostname | ||||||
|     unit = getUnitFromHostname(hostname) |     unit = getUnitFromHostname(hostname) | ||||||
|  |  | ||||||
|     return { |     return { | ||||||
|       props: { |       props: { | ||||||
|         unit |         unit, | ||||||
|  |         updated | ||||||
|       } |       } | ||||||
|     }; |     }; | ||||||
|   } |   } | ||||||
| </script> | </script> | ||||||
|  |  | ||||||
| <script lang="ts"> |  | ||||||
|   export let unit: IRack; |  | ||||||
| </script> |  | ||||||
|  |  | ||||||
| <div> | <div> | ||||||
|   {#if unit} |   {#if updated || unit} | ||||||
|     <h2>{ unit.hostname }</h2> |     <h2>{ unit.hostname }</h2> | ||||||
|  |  | ||||||
|     {#each JSON.stringify(unit).split(",") as segment} |     {#each JSON.stringify(unit).split(",") as segment} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user