Fix prettier
This commit is contained in:
@@ -14,9 +14,7 @@ const StatsCard = ({
|
|||||||
{title}
|
{title}
|
||||||
</Text>
|
</Text>
|
||||||
<Link href={href}>
|
<Link href={href}>
|
||||||
<Text color="blue">
|
<Text color="blue">View all</Text>
|
||||||
View all
|
|
||||||
</Text>
|
|
||||||
</Link>
|
</Link>
|
||||||
</HStack>
|
</HStack>
|
||||||
<Divider />
|
<Divider />
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const IconLink = ({ icon, label, href, color, ...props }: IconLinkProps) => {
|
|||||||
<NavSidebarOption activeHrefPattern={href}>
|
<NavSidebarOption activeHrefPattern={href}>
|
||||||
<HStack w="full" p={2} color={color} justifyContent="start" {...props}>
|
<HStack w="full" p={2} color={color} justifyContent="start" {...props}>
|
||||||
<Icon as={icon} boxSize={6} mr={2} />
|
<Icon as={icon} boxSize={6} mr={2} />
|
||||||
<Text fontSize="sm" display={{base: 'none', md: 'block'}}>
|
<Text fontSize="sm" display={{ base: "none", md: "block" }}>
|
||||||
{label}
|
{label}
|
||||||
</Text>
|
</Text>
|
||||||
</HStack>
|
</HStack>
|
||||||
|
|||||||
@@ -1,17 +1,19 @@
|
|||||||
import { Flex, type FlexProps } from "@chakra-ui/react";
|
import { Flex, type FlexProps } from "@chakra-ui/react";
|
||||||
|
|
||||||
const PageHeaderContainer = (props: FlexProps) => {
|
const PageHeaderContainer = (props: FlexProps) => {
|
||||||
return <Flex
|
return (
|
||||||
px={8}
|
<Flex
|
||||||
py={2}
|
px={8}
|
||||||
minH={16}
|
py={2}
|
||||||
w="full"
|
minH={16}
|
||||||
direction={{ base: "column", sm: "row" }}
|
w="full"
|
||||||
alignItems={{ base: "flex-start", sm: "center" }}
|
direction={{ base: "column", sm: "row" }}
|
||||||
justifyContent="space-between"
|
alignItems={{ base: "flex-start", sm: "center" }}
|
||||||
fontWeight="500"
|
justifyContent="space-between"
|
||||||
{...props}
|
fontWeight="500"
|
||||||
/>;
|
{...props}
|
||||||
|
/>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default PageHeaderContainer;
|
export default PageHeaderContainer;
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ import Head from "next/head";
|
|||||||
import PageHeaderContainer from "~/components/nav/PageHeaderContainer";
|
import PageHeaderContainer from "~/components/nav/PageHeaderContainer";
|
||||||
import ProjectBreadcrumbContents from "~/components/nav/ProjectBreadcrumbContents";
|
import ProjectBreadcrumbContents from "~/components/nav/ProjectBreadcrumbContents";
|
||||||
|
|
||||||
|
|
||||||
// TODO: import less to fix deployment with server side props
|
// TODO: import less to fix deployment with server side props
|
||||||
// export const getServerSideProps = async (context: GetServerSidePropsContext<{ id: string }>) => {
|
// export const getServerSideProps = async (context: GetServerSidePropsContext<{ id: string }>) => {
|
||||||
// const experimentId = context.params?.id as string;
|
// const experimentId = context.params?.id as string;
|
||||||
|
|||||||
@@ -7,8 +7,10 @@ import { env } from "~/env.mjs";
|
|||||||
|
|
||||||
// The client codegen script doesn't properly read the default export
|
// The client codegen script doesn't properly read the default export
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
const untypedGitHubModule = GitHubModule as unknown as any
|
const untypedGitHubModule = GitHubModule as unknown as any;
|
||||||
const GitHubProvider: typeof GitHubModule = untypedGitHubModule.default ? untypedGitHubModule.default : untypedGitHubModule
|
const GitHubProvider: typeof GitHubModule = untypedGitHubModule.default
|
||||||
|
? untypedGitHubModule.default
|
||||||
|
: untypedGitHubModule;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module augmentation for `next-auth` types. Allows us to add custom properties to the `session`
|
* Module augmentation for `next-auth` types. Allows us to add custom properties to the `session`
|
||||||
|
|||||||
@@ -9,20 +9,14 @@ console.log("Exporting public OpenAPI schema to client-libs/schema.json");
|
|||||||
const scriptPath = import.meta.url.replace("file://", "");
|
const scriptPath = import.meta.url.replace("file://", "");
|
||||||
const clientLibsPath = path.join(path.dirname(scriptPath), "../../../../client-libs");
|
const clientLibsPath = path.join(path.dirname(scriptPath), "../../../../client-libs");
|
||||||
|
|
||||||
const schemaPath = path.join(
|
const schemaPath = path.join(clientLibsPath, "schema.json");
|
||||||
clientLibsPath,
|
|
||||||
"schema.json"
|
|
||||||
);
|
|
||||||
|
|
||||||
console.log("Exporting schema");
|
console.log("Exporting schema");
|
||||||
fs.writeFileSync(schemaPath, JSON.stringify(openApiDocument, null, 2), "utf-8");
|
fs.writeFileSync(schemaPath, JSON.stringify(openApiDocument, null, 2), "utf-8");
|
||||||
|
|
||||||
console.log("Generating Typescript client");
|
console.log("Generating Typescript client");
|
||||||
|
|
||||||
const tsClientPath = path.join(
|
const tsClientPath = path.join(clientLibsPath, "js/codegen");
|
||||||
clientLibsPath,
|
|
||||||
"js/codegen"
|
|
||||||
);
|
|
||||||
|
|
||||||
fs.rmSync(tsClientPath, { recursive: true, force: true });
|
fs.rmSync(tsClientPath, { recursive: true, force: true });
|
||||||
|
|
||||||
@@ -30,7 +24,7 @@ execSync(
|
|||||||
`pnpm dlx @openapitools/openapi-generator-cli generate -i "${schemaPath}" -g typescript-axios -o "${tsClientPath}"`,
|
`pnpm dlx @openapitools/openapi-generator-cli generate -i "${schemaPath}" -g typescript-axios -o "${tsClientPath}"`,
|
||||||
{
|
{
|
||||||
stdio: "inherit",
|
stdio: "inherit",
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log("Done!");
|
console.log("Done!");
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ export const requireCanModifyOrganization = async (organizationId: string, ctx:
|
|||||||
}
|
}
|
||||||
|
|
||||||
ctx.markAccessControlRun();
|
ctx.markAccessControlRun();
|
||||||
}
|
};
|
||||||
|
|
||||||
export const requireCanViewDataset = async (datasetId: string, ctx: TRPCContext) => {
|
export const requireCanViewDataset = async (datasetId: string, ctx: TRPCContext) => {
|
||||||
const dataset = await prisma.dataset.findFirst({
|
const dataset = await prisma.dataset.findFirst({
|
||||||
|
|||||||
Reference in New Issue
Block a user