-
Notifications
You must be signed in to change notification settings - Fork 24
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
16 changed files
with
177 additions
and
65 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"use client"; | ||
import { FC } from "react"; | ||
import { graphql } from "relay-runtime"; | ||
|
||
import { SerializablePreloadedQuery } from "@/relay/loadPageQuery"; | ||
import { usePageQuery } from "@/relay/usePageQuery"; | ||
|
||
import { FrontPageModelList } from "./FrontPageModelList"; | ||
|
||
import { FrontPageQuery } from "@/__generated__/FrontPageQuery.graphql"; | ||
|
||
const Query = graphql` | ||
query FrontPageQuery { | ||
...FrontPageModelList | ||
} | ||
`; | ||
|
||
export const FrontPage: FC<{ | ||
query: SerializablePreloadedQuery<FrontPageQuery>; | ||
}> = ({ query }) => { | ||
const [data] = usePageQuery(Query, query); | ||
|
||
return <FrontPageModelList dataRef={data} />; | ||
}; |
File renamed without changes.
24 changes: 24 additions & 0 deletions
24
packages/hub/src/app/(frontpage)/definitions/DefinitionsPage.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,24 @@ | ||
"use client"; | ||
import { FC } from "react"; | ||
import { graphql } from "relay-runtime"; | ||
|
||
import { SerializablePreloadedQuery } from "@/relay/loadPageQuery"; | ||
import { usePageQuery } from "@/relay/usePageQuery"; | ||
|
||
import { FrontPageDefinitionList } from "./FrontPageDefinitionList"; | ||
|
||
import { DefinitionsPageQuery } from "@/__generated__/DefinitionsPageQuery.graphql"; | ||
|
||
const Query = graphql` | ||
query DefinitionsPageQuery { | ||
...FrontPageDefinitionList | ||
} | ||
`; | ||
|
||
export const DefinitionsPage: FC<{ | ||
query: SerializablePreloadedQuery<DefinitionsPageQuery>; | ||
}> = ({ query }) => { | ||
const [data] = usePageQuery(Query, query); | ||
|
||
return <FrontPageDefinitionList dataRef={data} />; | ||
}; |
File renamed without changes.
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,13 @@ | ||
import { loadPageQuery } from "@/relay/loadPageQuery"; | ||
|
||
import { DefinitionsPage } from "./DefinitionsPage"; | ||
|
||
import QueryNode, { | ||
DefinitionsPageQuery, | ||
} from "@/__generated__/DefinitionsPageQuery.graphql"; | ||
|
||
export default async function OuterDefinitionsPage() { | ||
const query = await loadPageQuery<DefinitionsPageQuery>(QueryNode, {}); | ||
|
||
return <DefinitionsPage query={query} />; | ||
} |
File renamed without changes.
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,24 @@ | ||
"use client"; | ||
import { FC } from "react"; | ||
import { graphql } from "relay-runtime"; | ||
|
||
import { SerializablePreloadedQuery } from "@/relay/loadPageQuery"; | ||
import { usePageQuery } from "@/relay/usePageQuery"; | ||
|
||
import { FrontPageGroupList } from "./FrontPageGroupList"; | ||
|
||
import { GroupsPageQuery } from "@/__generated__/GroupsPageQuery.graphql"; | ||
|
||
const Query = graphql` | ||
query GroupsPageQuery { | ||
...FrontPageGroupList | ||
} | ||
`; | ||
|
||
export const GroupsPage: FC<{ | ||
query: SerializablePreloadedQuery<GroupsPageQuery>; | ||
}> = ({ query }) => { | ||
const [data] = usePageQuery(Query, query); | ||
|
||
return <FrontPageGroupList dataRef={data} />; | ||
}; |
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,13 @@ | ||
import { loadPageQuery } from "@/relay/loadPageQuery"; | ||
|
||
import { GroupsPage } from "./GroupsPage"; | ||
|
||
import QueryNode, { | ||
GroupsPageQuery, | ||
} from "@/__generated__/GroupsPageQuery.graphql"; | ||
|
||
export default async function OuterGroupsPage() { | ||
const query = await loadPageQuery<GroupsPageQuery>(QueryNode, {}); | ||
|
||
return <GroupsPage query={query} />; | ||
} |
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,22 @@ | ||
import { PropsWithChildren } from "react"; | ||
|
||
import { NarrowPageLayout } from "@/components/layout/NarrowPageLayout"; | ||
import { | ||
StyledTabLink, | ||
StyledTabLinkList, | ||
} from "@/components/ui/StyledTabLink"; | ||
import { definitionsRoute, groupsRoute, variablesRoute } from "@/routes"; | ||
|
||
export default function FrontPageLayout({ children }: PropsWithChildren) { | ||
return ( | ||
<NarrowPageLayout> | ||
<StyledTabLinkList> | ||
<StyledTabLink name="Models" href="/" prefetch /> | ||
<StyledTabLink name="Variables" href={variablesRoute()} prefetch /> | ||
<StyledTabLink name="Definitions" href={definitionsRoute()} prefetch /> | ||
<StyledTabLink name="Groups" href={groupsRoute()} prefetch /> | ||
</StyledTabLinkList> | ||
<div className="mt-4">{children}</div> | ||
</NarrowPageLayout> | ||
); | ||
} |
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
File renamed without changes.
24 changes: 24 additions & 0 deletions
24
packages/hub/src/app/(frontpage)/variables/VariablesPage.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,24 @@ | ||
"use client"; | ||
import { FC } from "react"; | ||
import { graphql } from "relay-runtime"; | ||
|
||
import { SerializablePreloadedQuery } from "@/relay/loadPageQuery"; | ||
import { usePageQuery } from "@/relay/usePageQuery"; | ||
|
||
import { FrontPageVariableList } from "./FrontPageVariableList"; | ||
|
||
import { VariablesPageQuery } from "@/__generated__/VariablesPageQuery.graphql"; | ||
|
||
const Query = graphql` | ||
query VariablesPageQuery { | ||
...FrontPageVariableList | ||
} | ||
`; | ||
|
||
export const VariablesPage: FC<{ | ||
query: SerializablePreloadedQuery<VariablesPageQuery>; | ||
}> = ({ query }) => { | ||
const [data] = usePageQuery(Query, query); | ||
|
||
return <FrontPageVariableList dataRef={data} />; | ||
}; |
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,13 @@ | ||
import { loadPageQuery } from "@/relay/loadPageQuery"; | ||
|
||
import { VariablesPage } from "./VariablesPage"; | ||
|
||
import QueryNode, { | ||
VariablesPageQuery, | ||
} from "@/__generated__/VariablesPageQuery.graphql"; | ||
|
||
export default async function OuterVariablesPage() { | ||
const query = await loadPageQuery<VariablesPageQuery>(QueryNode, {}); | ||
|
||
return <VariablesPage query={query} />; | ||
} |
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 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