Skip to content

Commit

Permalink
First approach to commands
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszmigas committed Mar 3, 2024
1 parent a551cfc commit a2a78fc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
16 changes: 16 additions & 0 deletions apps/web/src/commands/addWorkspaceLayer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { CommandContext } from "./context";

export const command = {
name: "addWorkspaceLayer",
description: "Add a new layer to the workspace",
run: async (
context: CommandContext,
payload: {
workspaceId: string;
layerName: string;
}
) => {
console.log("Adding a new layer to the workspace");
},
};

1 change: 1 addition & 0 deletions apps/web/src/commands/context.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type CommandContext = {};
4 changes: 4 additions & 0 deletions apps/web/src/commands/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const executeCommand = (command: string) => {
console.log(`Executing command: ${command}`);
};

0 comments on commit a2a78fc

Please sign in to comment.