fix: move initialLogoState out of use-server file into logo-types.ts
This commit is contained in:
@@ -14,10 +14,10 @@ import {
|
||||
} from "@/components/ui/card";
|
||||
import { cn } from "@/lib/utils";
|
||||
import {
|
||||
initialLogoState,
|
||||
removeLogoAction,
|
||||
uploadLogoAction,
|
||||
} from "@/lib/appwrite/logo-actions";
|
||||
import { initialLogoState } from "@/lib/appwrite/logo-types";
|
||||
|
||||
type Props = {
|
||||
canEdit: boolean;
|
||||
|
||||
@@ -5,6 +5,7 @@ import { ID, Permission, Role } from "node-appwrite";
|
||||
import { InputFile } from "node-appwrite/file";
|
||||
|
||||
import { logAudit } from "./audit";
|
||||
import type { LogoActionState } from "./logo-types";
|
||||
import { BUCKETS, DATABASE_ID, TABLES } from "./schema";
|
||||
import { createAdminClient } from "./server";
|
||||
import { requireRole, requireTenant } from "./tenant-guard";
|
||||
@@ -18,13 +19,6 @@ const ALLOWED_TYPES = new Set([
|
||||
"image/svg+xml",
|
||||
]);
|
||||
|
||||
export type LogoActionState = {
|
||||
ok: boolean;
|
||||
error?: string;
|
||||
};
|
||||
|
||||
export const initialLogoState: LogoActionState = { ok: false };
|
||||
|
||||
function teamLogoPermissions(tenantId: string) {
|
||||
return [
|
||||
Permission.read(Role.any()),
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
export type LogoActionState = {
|
||||
ok: boolean;
|
||||
error?: string;
|
||||
};
|
||||
|
||||
export const initialLogoState: LogoActionState = { ok: false };
|
||||
Reference in New Issue
Block a user