Skip to content

Commit

Permalink
Merge pull request #344 from alonkeyval/TASK-149-overview-container
Browse files Browse the repository at this point in the history
Task 149 sources container
  • Loading branch information
alonkeyval authored Jul 30, 2023
2 parents af74a4a + 3f0700a commit e03bf92
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/webapp/app/overview/sources/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
"use client";
import { SourcesContainer } from "@/containers/overview";
import React from "react";

export default function SourcesOverviewPage() {
return <div>SourcesOverviewPage</div>;
return (
<>
<SourcesContainer />
</>
);
}
1 change: 1 addition & 0 deletions frontend/webapp/containers/overview/index.tsx
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { OverviewContainer } from "./overview/overview";
export { DestinationContainer } from "./destination/destination";
export { SourcesContainer } from "./sources/sources";
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import styled from "styled-components";

export const SourcesContainerWrapper = styled.div`
height: 100vh;
width: 100%;
overflow-y: scroll;
`;
26 changes: 26 additions & 0 deletions frontend/webapp/containers/overview/sources/sources.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"use client";
import React from "react";
import { KeyvalLoader } from "@/design.system";
import { OVERVIEW, QUERIES } from "@/utils/constants";
import { useQuery } from "react-query";
import { getSources } from "@/services";
import { OverviewHeader } from "@/components/overview";
import { SourcesContainerWrapper } from "./sources.styled";

export function SourcesContainer() {
const {
data: sources,
refetch,
isLoading,
} = useQuery([QUERIES.API_SOURCES], getSources);

if (isLoading) {
return <KeyvalLoader />;
}

return (
<SourcesContainerWrapper>
<OverviewHeader title={OVERVIEW.MENU.SOURCES} />
</SourcesContainerWrapper>
);
}

0 comments on commit e03bf92

Please sign in to comment.