diff --git a/actions/Schemas/find.ts b/actions/Schemas/find.ts new file mode 100644 index 0000000..9771fd8 --- /dev/null +++ b/actions/Schemas/find.ts @@ -0,0 +1,20 @@ +"use server"; + +import { prisma } from "@/prisma/prismaClient"; + +export const findSchema = async (id: string) => { + const schema = await prisma.schema.findFirst({ + where: { + id, + }, + include: { + gameSystem: { + select: { + id: true, + name: true, + }, + }, + }, + }); + return schema; +}; diff --git a/app/globals.css b/app/globals.css index b8dac86..b362e3f 100644 --- a/app/globals.css +++ b/app/globals.css @@ -9,7 +9,8 @@ body { @apply dark:bg-mixed-100 bg-primary-600; } - input { + input, + select { @apply py-2 px-4 rounded-full dark:bg-mixed-200 bg-mixed-600 placeholder:text-dark-500; } textarea { @@ -46,8 +47,11 @@ /* @apply bg-mixed-200 rounded-3xl p-6 shadow-2xl */; } + .btn { + @apply rounded-full; + } .btn-primary { - @apply dark:bg-primary-500 bg-primary-100 py-4 px-6 dark:text-mixed-100 text-white rounded-full font-bold text-lg; + @apply dark:bg-primary-500 bg-primary-100 py-4 px-6 dark:text-mixed-100 text-white font-bold text-lg btn; } .btn-secondary { @apply dark:text-primary-500 text-primary-100 py-4 px-6 font-bold text-lg; diff --git a/assets/icons/Help Icon.svg b/assets/icons/Help Icon.svg index 521d056..cbb6ef3 100644 --- a/assets/icons/Help Icon.svg +++ b/assets/icons/Help Icon.svg @@ -1,70 +1,27 @@ - - - - - image/svg+xml - - - - - - - - - - - + + + + + image/svg+xml + + + + + + + + + + + \ No newline at end of file diff --git a/components/Poppables/help.tsx b/components/Poppables/help.tsx index 3b8d514..c667346 100644 --- a/components/Poppables/help.tsx +++ b/components/Poppables/help.tsx @@ -9,7 +9,7 @@ export const HelpPopper: FC = ({ children }) => { preferredAlign="centered" preferredEdge="bottom" > - + ); }; diff --git a/components/schema/field-editor.tsx b/components/schema/field-editor.tsx index b45b87f..b1d163d 100644 --- a/components/schema/field-editor.tsx +++ b/components/schema/field-editor.tsx @@ -101,14 +101,14 @@ export const FieldEditor: FC = (

diff --git a/components/schema/index.tsx b/components/schema/index.tsx index 2fe7d5b..beeaaac 100644 --- a/components/schema/index.tsx +++ b/components/schema/index.tsx @@ -55,8 +55,8 @@ export const SchemaBuilder: FC = () => { const { value: schemaFieldName, - bind: bindTemplateName, - reset: resetTemplateName, + bind: bindSchemaFieldName, + reset: resetSchemaFieldName, } = useInput("", { disallowSpaces: true }); const addSchemaField = useCallback(() => { updateSchema((s) => ({ @@ -68,8 +68,8 @@ export const SchemaBuilder: FC = () => { }, }, })); - resetTemplateName(); - }, [resetTemplateName, schemaFieldName, updateSchema]); + resetSchemaFieldName(); + }, [resetSchemaFieldName, schemaFieldName, updateSchema]); const updateSchemaField = useCallback((key: string, template: Template) => { updateSchema((s) => ({ @@ -101,7 +101,7 @@ export const SchemaBuilder: FC = () => {

Add Schema Field

- + @@ -178,13 +178,14 @@ export const SchemaBuilder: FC = () => {