mirror of
https://github.com/documenso/documenso.git
synced 2025-11-23 05:01:54 +10:00
fix: wip
This commit is contained in:
@ -4,7 +4,7 @@ import { Trans, msg } from '@lingui/macro';
|
||||
import { useLingui } from '@lingui/react';
|
||||
import type { TemplateDirectLink } from '@prisma/client';
|
||||
import { TemplateType } from '@prisma/client';
|
||||
import { getRequiredSessionContext } from 'server/utils/get-required-session-context';
|
||||
import { getRequiredLoaderSession } from 'server/utils/get-required-session-context';
|
||||
|
||||
import { useSession } from '@documenso/lib/client-only/providers/session';
|
||||
import { getUserPublicProfile } from '@documenso/lib/server-only/user/get-user-public-profile';
|
||||
@ -44,7 +44,7 @@ const teamProfileText = {
|
||||
};
|
||||
|
||||
export async function loader({ context }: Route.LoaderArgs) {
|
||||
const { user } = getRequiredSessionContext(context);
|
||||
const { user } = getRequiredLoaderSession(context);
|
||||
|
||||
const { profile } = await getUserPublicProfile({
|
||||
userId: user.id,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { Trans } from '@lingui/macro';
|
||||
import { useLingui } from '@lingui/react';
|
||||
import { DateTime } from 'luxon';
|
||||
import { getRequiredSessionContext } from 'server/utils/get-required-session-context';
|
||||
import { getRequiredLoaderSession } from 'server/utils/get-required-session-context';
|
||||
|
||||
import { getUserTokens } from '@documenso/lib/server-only/public-api/get-all-user-tokens';
|
||||
import { Button } from '@documenso/ui/primitives/button';
|
||||
@ -12,7 +12,7 @@ import { ApiTokenForm } from '~/components/forms/token';
|
||||
import type { Route } from './+types/index';
|
||||
|
||||
export async function loader({ context }: Route.LoaderArgs) {
|
||||
const { user } = getRequiredSessionContext(context);
|
||||
const { user } = getRequiredLoaderSession(context);
|
||||
|
||||
// Todo: Use TRPC & use table instead
|
||||
const tokens = await getUserTokens({ userId: user.id });
|
||||
|
||||
Reference in New Issue
Block a user