Skip to content

Commit

Permalink
fix(frontend): documents before connections (#2711)
Browse files Browse the repository at this point in the history
# Description

Please include a summary of the changes and the related issue. Please
also include relevant motivation and context.

## Checklist before requesting a review

Please delete options that are not relevant.

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented hard-to-understand areas
- [ ] I have ideally added tests that prove my fix is effective or that
my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged

## Screenshots (if appropriate):
  • Loading branch information
Zewed authored Jun 24, 2024
1 parent 546c44c commit 131eef7
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const KnowledgeToFeed = ({
}): JSX.Element => {
const { allBrains, setCurrentBrainId, currentBrainId, currentBrain } =
useBrainContext();
const [selectedTab, setSelectedTab] = useState("Connections");
const [selectedTab, setSelectedTab] = useState("Documents");
const { knowledgeToFeed } = useKnowledgeToFeedContext();
const { openedConnections, setOpenedConnections, setCurrentSyncId } =
useFromConnectionsContext();
Expand All @@ -40,14 +40,6 @@ export const KnowledgeToFeed = ({
);

const knowledgesTabs: Tab[] = [
{
label: "Connections",
isSelected: selectedTab === "Connections",
onClick: () => setSelectedTab("Connections"),
iconName: "sync",
badge: openedConnections.filter((connection) => connection.submitted)
.length,
},
{
label: "Documents",
isSelected: selectedTab === "Documents",
Expand All @@ -57,6 +49,14 @@ export const KnowledgeToFeed = ({
(knowledge) => knowledge.source === "upload"
).length,
},
{
label: "Connections",
isSelected: selectedTab === "Connections",
onClick: () => setSelectedTab("Connections"),
iconName: "sync",
badge: openedConnections.filter((connection) => connection.submitted)
.length,
},
{
label: "Websites' page",
isSelected: selectedTab === "Websites",
Expand Down

0 comments on commit 131eef7

Please sign in to comment.