Unify workspace dropdowns; Update layouts (#458)

Unified Account and Workspace drop-downs; Layout updates, now header lives within the PageBody component; Sidebars now use floating variant
This commit is contained in:
Giancarlo Buomprisco
2026-03-11 14:45:42 +08:00
committed by GitHub
parent ca585e09be
commit 4bc8448a1d
530 changed files with 14398 additions and 11198 deletions

View File

@@ -1,18 +1,17 @@
'use server';
import 'server-only';
import { redirect } from 'next/navigation';
import { enhanceAction } from '@kit/next/actions';
import { authActionClient } from '@kit/next/safe-action';
import { getLogger } from '@kit/shared/logger';
import { CreateTeamSchema } from '../../schema/create-team.schema';
import { createAccountCreationPolicyEvaluator } from '../policies';
import { createCreateTeamAccountService } from '../services/create-team-account.service';
export const createTeamAccountAction = enhanceAction(
async ({ name, slug }, user) => {
export const createTeamAccountAction = authActionClient
.schema(CreateTeamSchema)
.action(async ({ parsedInput: { name, slug }, ctx: { user } }) => {
const logger = await getLogger();
const service = createCreateTeamAccountService();
@@ -61,7 +60,7 @@ export const createTeamAccountAction = enhanceAction(
if (error === 'duplicate_slug') {
return {
error: true,
message: 'teams:duplicateSlugError',
message: 'teams.duplicateSlugError',
};
}
@@ -70,8 +69,4 @@ export const createTeamAccountAction = enhanceAction(
const accountHomePath = '/home/' + data.slug;
redirect(accountHomePath);
},
{
schema: CreateTeamSchema,
},
);
});