Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nexmoe committed Apr 11, 2024
1 parent ca09321 commit 66cd109
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 30 deletions.
2 changes: 1 addition & 1 deletion components/flow/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ provide('flow', props.flow)
<FlowHeader v-if="props.header" :id="props.flow!.id" :title="props.flow!.title" :url="props.flow!.homepage" />

<div class="flow-body">
<NuxtLink v-for="(module) in props.flow!.module" :title="module.title" :key="module.url" :to="module.url" target="_blank">
<NuxtLink v-for="(module) in props.flow!.module" :key="module.url" :title="module.title" :to="module.url" target="_blank">
<ModuleList v-if="props.flow!.configCard === 'list'" v-bind="{ module }" />
<ModuleProject v-else-if="props.flow!.configCard === 'project'" v-bind="{ module }" />
<ModuleImage v-else v-bind="{ module }" />
Expand Down
2 changes: 1 addition & 1 deletion components/module/Image.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const text = computed(() => extractTextFromHTML(props.module.content))
<h3 v-if="!flow.configNoTitle" class="font-bold text-2xl tracking-tight text-black">
{{ props.module.title }}
</h3>
<div class="line-clamp-3" v-if="!flow.configNoContent && text !== ' '">
<div v-if="!flow.configNoContent && text !== ' '" class="line-clamp-3">
<div v-html="text" />
</div>
<div
Expand Down
1 change: 0 additions & 1 deletion layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ useHead({
lang: 'zh-CN',
},
})
</script>

<template>
Expand Down
6 changes: 3 additions & 3 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ export default defineNuxtConfig({
categories: {
sources: [
'/api/__sitemap__/urls/categories',
]
}
}
],
},
},
},
extends: ['@sidebase/core'],
image: {
Expand Down
1 change: 0 additions & 1 deletion pages/flow/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ defineOgImageComponent('NuxtSeo', {

<template>
<div class="container">

<Head>
<Title>{{ flow.title }}</Title>
</Head>
Expand Down
24 changes: 12 additions & 12 deletions server/api/__sitemap__/urls/categories.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
export default defineSitemapEventHandler(async (event) => {
const prisma = event.context.prisma
const prisma = event.context.prisma

const flows = await prisma.flow.findMany({
select: {
id: true,
updatedAt: true
}
})
const flows = await prisma.flow.findMany({
select: {
id: true,
updatedAt: true,
},
})

const posts = flows.map(p => ({
loc: `/flow/${p.id}`,
lastmod: p.updatedAt
}))
const posts = flows.map(p => ({
loc: `/flow/${p.id}`,
lastmod: p.updatedAt,
}))

return posts
return posts
})
22 changes: 11 additions & 11 deletions server/middleware/update-site-config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// https://trpc-nuxt.vercel.app/get-started/tips/server-side-calls
import { appRouter } from '@/server/trpc/routers'
// // https://trpc-nuxt.vercel.app/get-started/tips/server-side-calls
// import { appRouter } from '@/server/trpc/routers'

export default eventHandler(async (e) => {
const caller = appRouter.createCaller({ prisma: e.context.prisma })
// export default eventHandler(async (e) => {
// const caller = appRouter.createCaller({ prisma: e.context.prisma })

const config = await caller.config.get()
// updateSiteConfig({
// name: config.siteName,
// description: config.siteDescription,
// url: config.siteUrl,
// })
})
// const config = await caller.config.get()
// updateSiteConfig({
// name: config.siteName,
// description: config.siteDescription,
// url: config.siteUrl,
// })
// })

0 comments on commit 66cd109

Please sign in to comment.