pinafore/routes/_pages/lists/[listId].html
Nolan Lawson 42be854521
upgrade to svelte 2.0 (#251)
* upgrade to svelte 2.0

* update svelte-loader to 2.9.0
2018-05-01 17:05:36 -07:00

36 lines
1 KiB
HTML

{#if $isUserLoggedIn}
<TimelinePage timeline="list/{params.listId}">
{#if $pinnedPage !== `/lists/${params.listId}`}
<DynamicPageBanner title={listTitle} icon="#fa-bars"/>
{/if}
</TimelinePage>
{:else}
<HiddenFromSSR>
<FreeTextLayout>
<h1>List</h1>
<p>A list will appear here when logged in.</p>
</FreeTextLayout>
</HiddenFromSSR>
{/if}
<script>
import TimelinePage from '../../_components/TimelinePage.html'
import FreeTextLayout from '../../_components/FreeTextLayout.html'
import { store } from '../../_store/store.js'
import HiddenFromSSR from '../../_components/HiddenFromSSR'
import DynamicPageBanner from '../../_components/DynamicPageBanner.html'
export default {
computed: {
list: ({ params, $lists }) => $lists && $lists.find(_ => _.id === params['listId']),
listTitle: ({ list }) => list ? list.title : ''
},
store: () => store,
components: {
TimelinePage,
FreeTextLayout,
HiddenFromSSR,
DynamicPageBanner
}
}
</script>