-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Jamakase/refactor initial load (#7713)
* Refactor initial load * Fetch data for sidebar in async * Use current version by default in connector version input * Add custom image annotation
- Loading branch information
Showing
14 changed files
with
109 additions
and
89 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
18 changes: 18 additions & 0 deletions
18
airbyte-webapp/src/hooks/services/useDestinationDefinition.tsx
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,18 @@ | ||
import { useResource } from "rest-hooks"; | ||
|
||
import DestinationDefinitionResource, { | ||
DestinationDefinition, | ||
} from "core/resources/DestinationDefinition"; | ||
import useWorkspace from "./useWorkspace"; | ||
|
||
const useDestinationDefinitionList = (): { | ||
destinationDefinitions: DestinationDefinition[]; | ||
} => { | ||
const { workspace } = useWorkspace(); | ||
|
||
return useResource(DestinationDefinitionResource.listShape(), { | ||
workspaceId: workspace.workspaceId, | ||
}); | ||
}; | ||
|
||
export { useDestinationDefinitionList }; |
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,18 @@ | ||
import { useResource } from "rest-hooks"; | ||
|
||
import SourceDefinitionResource, { | ||
SourceDefinition, | ||
} from "core/resources/SourceDefinition"; | ||
import useWorkspace from "./useWorkspace"; | ||
|
||
const useSourceDefinitionList = (): { | ||
sourceDefinitions: SourceDefinition[]; | ||
} => { | ||
const { workspace } = useWorkspace(); | ||
|
||
return useResource(SourceDefinitionResource.listShape(), { | ||
workspaceId: workspace.workspaceId, | ||
}); | ||
}; | ||
|
||
export { useSourceDefinitionList }; |
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
24 changes: 7 additions & 17 deletions
24
...bapp/src/pages/DestinationPage/pages/AllDestinationsPage/components/DestinationsTable.tsx
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
18 changes: 5 additions & 13 deletions
18
airbyte-webapp/src/pages/SettingsPage/pages/ConnectorsPage/SourcesPage.tsx
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
25 changes: 8 additions & 17 deletions
25
airbyte-webapp/src/pages/SourcesPage/pages/AllSourcesPage/components/SourcesTable.tsx
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
17 changes: 17 additions & 0 deletions
17
airbyte-webapp/src/views/layout/SideBar/NotificationIndicator.tsx
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,17 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
|
||
import useConnector from "hooks/services/useConnector"; | ||
import Indicator from "components/Indicator"; | ||
|
||
const Notification = styled(Indicator)` | ||
position: absolute; | ||
top: 11px; | ||
right: 23px; | ||
`; | ||
|
||
export const NotificationIndicator: React.FC = () => { | ||
const { hasNewVersions } = useConnector(); | ||
|
||
return hasNewVersions ? <Notification /> : null; | ||
}; |
Oops, something went wrong.