diff --git a/src/components/dagshub/data-engine/file-tree/FileList.tsx b/src/components/dagshub/data-engine/file-tree/FileList.tsx index 9a891a63..2b53f637 100644 --- a/src/components/dagshub/data-engine/file-tree/FileList.tsx +++ b/src/components/dagshub/data-engine/file-tree/FileList.tsx @@ -8,6 +8,7 @@ interface FileListInterface { selected: string | null; getFilesCb: (id: string) => Promise; setSelected: (id: string) => void; + emptyMessage?: string; } const Loader = () => ( @@ -29,18 +30,24 @@ export const FileList = ({ loading, setSelected, getFilesCb, - selected + selected, + emptyMessage }: FileListInterface) => { if (loading) { return ; } if (!children?.length) { - return This file is empty; + if (emptyMessage) { + return {emptyMessage}; + } + // fallback + return This directory is empty; } return ( {children?.map((child: FileListItemType) => ( Promise; @@ -29,7 +30,8 @@ export function FileTreeItem({ getFilesCb, setSelected, type, - href + href, + emptyMessage, }: FileItemInterface) { const [open, setOpen] = useState(false); const [children, setChildren] = useState(null); @@ -136,6 +138,7 @@ export function FileTreeItem({ void; getFilesCb: (id: string) => Promise; } -export const FileTree = ({ list, loading, getFilesCb, onSelect }: FileTreeInterface) => { +export const FileTree = ({ + list, + loading, + getFilesCb, + onSelect, + emptyMessage +}: FileTreeInterface) => { const [selected, setSelected] = useState(null); const handleSetSelected = (id: string) => { @@ -34,6 +41,7 @@ export const FileTree = ({ list, loading, getFilesCb, onSelect }: FileTreeInterf }} > - - + +
diff --git a/src/components/dagshub/organization/modals/add-member-modal/index.tsx b/src/components/dagshub/organization/modals/add-member-modal/index.tsx index 9bb817c8..bd492a0a 100644 --- a/src/components/dagshub/organization/modals/add-member-modal/index.tsx +++ b/src/components/dagshub/organization/modals/add-member-modal/index.tsx @@ -137,8 +137,8 @@ export function AddMemberModal({ label={`Add new ${isTeam ? 'team' : 'organization'} ${ isOrg && isAdmin ? 'admin' : 'member' }`} - fullWidth={true} - onClick={() => + fullWidth={true} + onClick={() => addMembers({ team, access, diff --git a/src/components/dagshub/organization/tables/teams-table/index.tsx b/src/components/dagshub/organization/tables/teams-table/index.tsx index a1e25068..2756e982 100644 --- a/src/components/dagshub/organization/tables/teams-table/index.tsx +++ b/src/components/dagshub/organization/tables/teams-table/index.tsx @@ -66,7 +66,7 @@ export interface TeamTableProps { copyInvitationAction: (args?: any) => void; existingTeamNames: string[]; addTeamReposLink: string; - addTeamReposAnalyticsEventAction:()=>void; + addTeamReposAnalyticsEventAction: () => void; } export interface OnEditTeamInput { @@ -399,7 +399,11 @@ export function TeamTable({ columns: [ This team doesn't have repositories yet{' '} - + Add team repositories diff --git a/src/components/icons/index.tsx b/src/components/icons/index.tsx index 4b2b32a3..8a1904f8 100644 --- a/src/components/icons/index.tsx +++ b/src/components/icons/index.tsx @@ -1660,7 +1660,7 @@ export const icons = { /> ), - 'beaker': ({ fill, width, height, onClick = () => {} }: IconProp) => ( + beaker: ({ fill, width, height, onClick = () => {} }: IconProp) => ( ), - 'annotations': ({fill, width, height, onClick = () => {}}: IconProp) => ( - - - - - - ), + annotations: ({ fill, width, height, onClick = () => {} }: IconProp) => ( + + + + + + ) }; export type IconType = keyof typeof icons; diff --git a/src/stories/dagshub/data-engine/file-tree/FileTree.stories.tsx b/src/stories/dagshub/data-engine/file-tree/FileTree.stories.tsx index 4d263f8f..30061adf 100644 --- a/src/stories/dagshub/data-engine/file-tree/FileTree.stories.tsx +++ b/src/stories/dagshub/data-engine/file-tree/FileTree.stories.tsx @@ -28,7 +28,7 @@ const generateRandOption = (l: number) => { }; const getFilesCb = (value: string) => { - const rndInt = randomIntFromInterval(0, 6); + const rndInt = randomIntFromInterval(0, 2); // mock api call return new Promise((resolve, reject) => { @@ -59,6 +59,7 @@ FileTreeWithFiles.args = { href: '/' } ], + emptyMessage: 'no files here', onSelect, getFilesCb, loading: false