-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix connections fake entry & s3 button (#860)
* Add getFakeEntry to registry * Add type for getFakeEntry definition
- Loading branch information
Showing
5 changed files
with
13 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import type {GetEntryResponse} from 'shared/schema/types'; | ||
|
||
/** A function that creates mocked entry to have properly Breadcrumbs view. */ | ||
export type GetFakeEntry = (workbookId?: string) => GetEntryResponse; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
import {i18n} from 'i18n'; | ||
import {DL} from 'ui'; | ||
import {getFakeEntry as genericGetFakeEntry} from 'ui/components/ActionPanel'; | ||
import type {GetFakeEntry} from 'ui/registry/units/connections/types/getFakeEntry'; | ||
|
||
import {getFakeEntry as genericGetFakeEntry} from '../../../../components/ActionPanel'; | ||
|
||
export const getFakeEntry = (workbookId?: string) => { | ||
export const getFakeEntry: GetFakeEntry = (workbookId) => { | ||
const name = i18n('connections.form', 'section_creation-connection'); | ||
|
||
return genericGetFakeEntry({ | ||
workbookId, | ||
key: `${DL.USER_FOLDER}${name}`, | ||
key: name, | ||
fakeName: name, | ||
}); | ||
}; |