From ca5617965e9aeead58b443a22d8970ca91e95d72 Mon Sep 17 00:00:00 2001 From: Dominik Zborowski Date: Mon, 21 Oct 2024 09:09:26 +0200 Subject: [PATCH] Remove default grid --- domains/grid/utils/defaultGridConfig.ts | 40 ------------------------- domains/grid/utils/getUserGrid.ts | 4 +-- 2 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 domains/grid/utils/defaultGridConfig.ts diff --git a/domains/grid/utils/defaultGridConfig.ts b/domains/grid/utils/defaultGridConfig.ts deleted file mode 100644 index 2026b705..00000000 --- a/domains/grid/utils/defaultGridConfig.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Default grid config - * - * @param address - * @returns - */ -export const defaultGridConfig = ( - address: string -): PartialBy, 'id'>[] => { - return [ - { - title: DEFAULT_GRID_TITLE, - grid: [ - { - type: GRID_WIDGET_TYPE.TITLE_LINK, - width: 1, - height: 1, - properties: { title: address, backgroundColor: '#7a83ae' }, - }, - { - type: GRID_WIDGET_TYPE.TEXT, - width: 1, - height: 1, - properties: { - title: 'Hey', - text: 'Customize your grid!', - backgroundColor: '#9db9b9', - }, - }, - { - type: GRID_WIDGET_TYPE.IMAGE, - width: 1, - height: 1, - properties: { src: 'https://via.placeholder.com/150' }, - }, - ], - gridColumns: 2, - }, - ] -} diff --git a/domains/grid/utils/getUserGrid.ts b/domains/grid/utils/getUserGrid.ts index a707b79d..aa66bb2d 100644 --- a/domains/grid/utils/getUserGrid.ts +++ b/domains/grid/utils/getUserGrid.ts @@ -6,7 +6,7 @@ export const getUserGrid = async ( address: Address ): Promise[]> => { - let config: PartialBy, 'id'>[] + let config: PartialBy, 'id'>[] = [] const userConfig = await getGridConfig(address) // if user config is invalid we load default one @@ -16,8 +16,6 @@ export const getUserGrid = async ( if (gridLog.enabled) { gridLog('Invalid config', userConfig) } - - config = defaultGridConfig(address) } return configToGrid(config)