Migrate more code to typescript
This commit is contained in:
@ -16,11 +16,7 @@ const { prevUrl, nextUrl, prevText = 'Newer posts', nextText = 'Older posts' } =
|
||||
(prevUrl || nextUrl) && (
|
||||
<div class="container flex">
|
||||
<div class="flex flex-row mx-auto container justify-between">
|
||||
<a
|
||||
href={getRelativeLink(prevUrl)}
|
||||
class={`btn btn-ghost px-3 mr-2
|
||||
${!prevUrl ? 'invisible' : ''}`}
|
||||
>
|
||||
<a href={getRelativeLink(prevUrl)} class={`btn btn-ghost px-3 mr-2 ${!prevUrl ? 'invisible' : ''}`}>
|
||||
<div class="flex flex-row align-middle">
|
||||
<Icon name="tabler:arrow-left" class="w-6 h-6" />
|
||||
<p class="ml-2">{prevText}</p>
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
import { getPermalink } from '~/utils/permalinks';
|
||||
|
||||
import type { Post } from '~/utils/posts';
|
||||
import type { Post } from "~/types"
|
||||
|
||||
export interface Props {
|
||||
tags: Post['tags'];
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
import Item from '~/components/blog/GridItem.astro';
|
||||
import type { Post } from '~/utils/posts';
|
||||
import type { Post } from "~/types"
|
||||
|
||||
export interface Props {
|
||||
posts: Array<Post>;
|
||||
|
@ -4,7 +4,7 @@ import { Picture } from '@astrojs/image/components';
|
||||
import { findImage } from '~/utils/images';
|
||||
import { getPermalink } from '~/utils/permalinks';
|
||||
|
||||
import type { Post } from '~/utils/posts';
|
||||
import type { Post } from "~/types"
|
||||
|
||||
export interface Props {
|
||||
post: Post;
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
import Item from '~/components/blog/ListItem.astro';
|
||||
import type { Post } from '~/utils/posts';
|
||||
import type { Post } from "~/types"
|
||||
|
||||
export interface Props {
|
||||
posts: Array<Post>;
|
||||
|
@ -6,7 +6,7 @@ import { getPermalink } from '~/utils/permalinks';
|
||||
import { findImage } from '~/utils/images';
|
||||
import { getFormattedDate } from '~/utils/utils';
|
||||
|
||||
import type { Post } from '~/utils/posts';
|
||||
import type { Post } from "~/types"
|
||||
|
||||
export interface Props {
|
||||
post: Post;
|
||||
|
@ -5,7 +5,7 @@ import SocialShare from '~/components/atoms/SocialShare.astro';
|
||||
|
||||
import { getFormattedDate } from '~/utils/utils';
|
||||
|
||||
import type { Post } from '~/utils/posts';
|
||||
import type { Post } from "~/types"
|
||||
|
||||
export interface Props {
|
||||
post: Post;
|
||||
|
@ -11,6 +11,8 @@ import Fonts from '../atoms/Fonts.astro';
|
||||
import ExtraMetaTags from '../atoms/ExtraMetaTags.astro';
|
||||
import SplitbeeAnalytics from './SplitbeeAnalytics.astro';
|
||||
|
||||
import { MetaSEO } from '~/types';
|
||||
|
||||
const { src: defaultImage } = await getImage({
|
||||
src: defaultImageSrc,
|
||||
alt: 'Default image',
|
||||
@ -18,6 +20,8 @@ const { src: defaultImage } = await getImage({
|
||||
height: 628,
|
||||
});
|
||||
|
||||
export interface Props extends MetaSEO {}
|
||||
|
||||
const {
|
||||
title = SITE.name,
|
||||
description = '',
|
||||
|
Reference in New Issue
Block a user