Skip to content

Commit

Permalink
VUU-20: Rename saveLayout to createLayout
Browse files Browse the repository at this point in the history
  • Loading branch information
pling-scottlogic committed Sep 21, 2023
1 parent c9bb4ee commit ad3198c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface LayoutPersistenceManager {
*
* @returns ID assigned to the saved layout
*/
saveLayout: (metadata: Omit<LayoutMetadata, "id">, layout: LayoutJSON) => string;
createLayout: (metadata: Omit<LayoutMetadata, "id">, layout: LayoutJSON) => string;

/**
* Overwrites an existing layout with a new one
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const metadataSaveLocation = "layouts/metadata";
const layoutsSaveLocation = "layouts/layouts";

export class LocalLayoutPersistenceManager implements LayoutPersistenceManager {
saveLayout(metadata: Omit<LayoutMetadata, "id">, layout: LayoutJSON): string {
createLayout(metadata: Omit<LayoutMetadata, "id">, layout: LayoutJSON): string {
console.log(`Saving layout as ${metadata.name} to group ${metadata.group}...`);

const existingLayouts = this.loadLayouts();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const LayoutManagementProvider = (props: {

if (json) {
// Persist layouts
const generatedId = persistenceManager.saveLayout(metadata, json);
const generatedId = persistenceManager.createLayout(metadata, json);

// Update state
const newMetadata: LayoutMetadata = {
Expand Down

0 comments on commit ad3198c

Please sign in to comment.