-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
349 additions
and
276 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
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 was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
58 changes: 0 additions & 58 deletions
58
src/pages/__generated__/DashboardResearchFragment.graphql.ts
This file was deleted.
Oops, something went wrong.
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,32 @@ | ||
import { Card } from "@mui/material" | ||
import validator from "@rjsf/validator-ajv8" | ||
import { FC } from "react" | ||
import { graphql, useLazyLoadQuery } from "react-relay" | ||
import { useParams } from "react-router-dom" | ||
import { Form } from "../../components/rjsf/Form" | ||
import { ResearchDetailPageQuery } from "./__generated__/ResearchDetailPageQuery.graphql" | ||
|
||
export const ResearchDetailPage: FC = () => { | ||
const { id } = useParams<{ id: string }>() | ||
if (!id) throw new Error("id is required") | ||
|
||
const data = useLazyLoadQuery<ResearchDetailPageQuery>( | ||
graphql` | ||
query ResearchDetailPageQuery($id: ID!) { | ||
research(id: $id) { | ||
id | ||
name | ||
schema | ||
} | ||
} | ||
`, | ||
{ id }, | ||
) | ||
|
||
return ( | ||
<Card className="p-4 shadow-lg"> | ||
<h1 className="text-lg">{data.research.name}</h1> | ||
<Form schema={data.research.schema} validator={validator} /> | ||
</Card> | ||
) | ||
} |
Oops, something went wrong.