Update packages and refactor logging in diverse services
This commit updates diverse packages such as "@makerkit/data-loader-supabase-core" and "@makerkit/data-loader-supabase-nextjs" to the new versions in the package.json files. Also, several refactorings were done in logging within services and loaders by progressing 'server-only' imports and improving context handling. Additionally, type annotations have been added to several exported functions for better code readability and maintainability.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { cache } from 'react';
|
||||
|
||||
import 'server-only';
|
||||
|
||||
import { cache } from 'react';
|
||||
|
||||
import { getSupabaseServerComponentClient } from '@kit/supabase/server-component-client';
|
||||
|
||||
export const loadPersonalAccountBillingPageData = cache((userId: string) => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'server-only';
|
||||
|
||||
import { SupabaseClient } from '@supabase/supabase-js';
|
||||
|
||||
import 'server-only';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { getProductPlanPair } from '@kit/billing';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { cache } from 'react';
|
||||
|
||||
import 'server-only';
|
||||
|
||||
import { cache } from 'react';
|
||||
|
||||
import { getSupabaseServerComponentClient } from '@kit/supabase/server-component-client';
|
||||
|
||||
export const loadTeamAccountBillingPage = cache((accountId: string) => {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'server-only';
|
||||
|
||||
import { cache } from 'react';
|
||||
|
||||
import { redirect } from 'next/navigation';
|
||||
|
||||
import 'server-only';
|
||||
|
||||
import { getSupabaseServerComponentClient } from '@kit/supabase/server-component-client';
|
||||
|
||||
import pathsConfig from '~/config/paths.config';
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'server-only';
|
||||
|
||||
import { SupabaseClient } from '@supabase/supabase-js';
|
||||
|
||||
import 'server-only';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { LineItemSchema } from '@kit/billing';
|
||||
|
||||
@@ -5,11 +5,11 @@ import { notFound } from 'next/navigation';
|
||||
import { ContentRenderer, createCmsClient } from '@kit/cms';
|
||||
import { If } from '@kit/ui/if';
|
||||
|
||||
import { SitePageHeader } from '~/(marketing)/_components/site-page-header';
|
||||
import { DocsCards } from '~/(marketing)/docs/_components/docs-cards';
|
||||
import { withI18n } from '~/lib/i18n/with-i18n';
|
||||
|
||||
import { SitePageHeader } from '../../_components/site-page-header';
|
||||
import styles from '../../blog/_components/html-renderer.module.css';
|
||||
import { DocsCards } from '../_components/docs-cards';
|
||||
|
||||
const getPageBySlug = cache(async (slug: string) => {
|
||||
const client = await createCmsClient();
|
||||
@@ -48,18 +48,10 @@ async function DocumentationPage({ params }: PageParams) {
|
||||
const description = page?.description ?? '';
|
||||
|
||||
return (
|
||||
<div>
|
||||
<SitePageHeader
|
||||
title={page.title}
|
||||
subtitle={description}
|
||||
className={'items-start'}
|
||||
/>
|
||||
<div className={'flex flex-1 flex-col'}>
|
||||
<SitePageHeader title={page.title} subtitle={description} />
|
||||
|
||||
<div
|
||||
className={
|
||||
'container relative mx-auto flex max-w-4xl grow flex-col space-y-4 py-6'
|
||||
}
|
||||
>
|
||||
<div className={'container flex max-w-5xl flex-col space-y-4 py-6'}>
|
||||
<article className={styles.HTML}>
|
||||
<ContentRenderer content={page.content} />
|
||||
</article>
|
||||
|
||||
@@ -57,12 +57,13 @@ function AccountsPage({ searchParams }: { searchParams: SearchParams }) {
|
||||
}
|
||||
|
||||
function getFilters(params: SearchParams) {
|
||||
const filters: {
|
||||
[key: string]: {
|
||||
const filters: Record<
|
||||
string,
|
||||
{
|
||||
eq?: boolean | string;
|
||||
like?: string;
|
||||
};
|
||||
} = {};
|
||||
}
|
||||
> = {};
|
||||
|
||||
if (params.account_type && params.account_type !== 'all') {
|
||||
filters.is_personal_account = {
|
||||
|
||||
Reference in New Issue
Block a user