Skip to main content

apps/web/components/admin-settings-console.tsx

Metadata

Indexed Symbols

  • pretty (line 17, function) - Implements pretty for module behavior.
  • withWorkspace (line 21, function) - Implements with workspace for module behavior.
  • loadJson (line 25, function) - Implements load json for module behavior.
  • AdminSettingsConsole (line 34, function) - Implements admin settings console for module behavior.
  • refresh (line 55, function) - Implements refresh for module behavior.
  • savePlatformSettings (line 81, function) - Implements save platform settings for module behavior.
  • saveWorkspaceSettings (line 101, function) - Implements save workspace settings for module behavior.
  • savePlatformSecret (line 121, function) - Implements save platform secret for module behavior.
  • saveWorkspaceSecret (line 144, function) - Implements save workspace secret for module behavior.

Markdown Headings (if applicable)

No markdown headings detected.

Source Preview

"use client";

import { useEffect, useMemo, useState } from "react";
import { Card } from "@anchor/ui";
import { withWorkspaceQuery } from "../lib/workspace-context";

type SecretMeta = {
key: string;
updatedAt: string;
updatedBy: string;
};

type AdminSettingsConsoleProps = {
workspaceId: string;
};

function pretty(value: unknown): string {
return JSON.stringify(value, null, 2);
}

function withWorkspace(path: string, workspaceId: string): string {
return withWorkspaceQuery(path, workspaceId);
}

async function loadJson(path: string, workspaceId: string): Promise<unknown> {