Migrate to typescript

This commit is contained in:
prototypa
2023-01-02 10:51:51 -05:00
parent ba0e67b55f
commit f158d32181
28 changed files with 172 additions and 85 deletions

View File

@ -1,6 +1,14 @@
---
import { Icon } from 'astro-icon';
import { getRelativeLink } from '~/utils/permalinks';
export interface Props {
prevUrl: string;
nextUrl: string;
prevText?: string;
nextText?: string;
}
const { prevUrl, nextUrl, prevText = 'Newer posts', nextText = 'Older posts' } = Astro.props;
---
@ -18,12 +26,7 @@ const { prevUrl, nextUrl, prevText = 'Newer posts', nextText = 'Older posts' } =
<p class="ml-2">{prevText}</p>
</div>
</a>
<a
href={getRelativeLink(nextUrl)}
class={`btn btn-ghost px-3 ${
!nextUrl ? 'invisible' : ''
}`}
>
<a href={getRelativeLink(nextUrl)} class={`btn btn-ghost px-3 ${!nextUrl ? 'invisible' : ''}`}>
<div class="flex flex-row align-middle">
<span class="mr-2">{nextText}</span>
<Icon name="tabler:arrow-right" class="w-6 h-6" />