Skip to content

Commit

Permalink
remove max width from root
Browse files Browse the repository at this point in the history
  • Loading branch information
alepbloyd committed Aug 26, 2024
1 parent 0247275 commit 1b0aadf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
36 changes: 17 additions & 19 deletions react/src/components/pages/InvestigationPage.tsx
Original file line number Diff line number Diff line change
@@ -1,37 +1,35 @@
import { useParams } from 'react-router'
import SideBar from '../SideBar.tsx'
import InvestigationGraph from '../graph/InvestigationGraph.tsx'
import Header from '../Header.tsx'
import { useInvestigationGraph } from '../../hooks/useInvestigationGraph.tsx'
import { useParams } from "react-router";
import SideBar from "../SideBar.tsx";
import InvestigationGraph from "../graph/InvestigationGraph.tsx";
import Header from "../Header.tsx";
import { useInvestigationGraph } from "../../hooks/useInvestigationGraph.tsx";

interface Props {
name: string
created_at: string
name: string;
created_at: string;
}

type InvestigationParams = {
investigationId: string
}
investigationId: string;
};

function InvestigationPage() {
const { investigationId } = useParams<InvestigationParams>()
const { error, data, loading } = useInvestigationGraph(investigationId)

if (loading) return <div>loading....</div>
if (error) return <div>uh oh error...</div>
const { investigationId } = useParams<InvestigationParams>();
const { error, data, loading } = useInvestigationGraph(investigationId);

console.log(data)
if (loading) return <div>loading....</div>;
if (error) return <div>uh oh error...</div>;

return (
<>
<Header />
<h1>Investigation: {data.investigation.name}</h1>
<div className="border-4 border-solid border-indigo-500">
<div className="flex flex-row">
<div className="basis-1/4">
<div className="basis-1/8">
<SideBar />
</div>
<div className="basis-3/4">
<div className="basis-7/8">
<InvestigationGraph
workNodes={data.investigation.workNodes}
authorNodes={data.investigation.authorNodes}
Expand All @@ -43,7 +41,7 @@ function InvestigationPage() {
</div>
</div>
</>
)
);
}

export default InvestigationPage
export default InvestigationPage;
2 changes: 1 addition & 1 deletion react/src/root.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#root {
max-width: 1280px;
/* max-width: 1280px; */
margin: 0 auto;
padding: 2rem;
text-align: center;
Expand Down

0 comments on commit 1b0aadf

Please sign in to comment.