Fix prettier

This commit is contained in:
David Corbitt
2023-08-07 21:45:36 -07:00
parent 6d32f1c06e
commit f47010a6e7
8 changed files with 24 additions and 29 deletions

View File

@@ -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 />

View File

@@ -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>

View File

@@ -1,7 +1,8 @@
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 (
<Flex
px={8} px={8}
py={2} py={2}
minH={16} minH={16}
@@ -11,7 +12,8 @@ const PageHeaderContainer = (props: FlexProps) => {
justifyContent="space-between" justifyContent="space-between"
fontWeight="500" fontWeight="500"
{...props} {...props}
/>; />
);
}; };
export default PageHeaderContainer; export default PageHeaderContainer;

View File

@@ -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;

View File

@@ -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`

View File

@@ -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!");

View File

@@ -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({