diff --git a/apps/frontend/app/admin/_components/FormSection.tsx b/apps/frontend/app/admin/_components/FormSection.tsx index e840e3bc5e..6f80a728f6 100644 --- a/apps/frontend/app/admin/_components/FormSection.tsx +++ b/apps/frontend/app/admin/_components/FormSection.tsx @@ -12,9 +12,9 @@ export default function FormSection({ return (
-
+
{title} - {isLabeled && *} + {isLabeled && *} {badge}
{content} diff --git a/apps/frontend/app/admin/_components/TitleForm.tsx b/apps/frontend/app/admin/_components/TitleForm.tsx index 1f09baccea..c5f008a073 100644 --- a/apps/frontend/app/admin/_components/TitleForm.tsx +++ b/apps/frontend/app/admin/_components/TitleForm.tsx @@ -15,7 +15,7 @@ export default function TitleForm({ placeholder }: { placeholder: string }) { id="title" type="text" placeholder={placeholder} - className={cn(inputStyle, 'w-[380px]')} + className={cn(inputStyle, 'w-[500px]')} {...register('title', { required: true })} diff --git a/apps/frontend/app/admin/problem/[id]/edit/page.tsx b/apps/frontend/app/admin/problem/[id]/edit/page.tsx index 594c987075..f18710a9fd 100644 --- a/apps/frontend/app/admin/problem/[id]/edit/page.tsx +++ b/apps/frontend/app/admin/problem/[id]/edit/page.tsx @@ -4,7 +4,6 @@ import { Button } from '@/components/ui/button' import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area' import { UPDATE_PROBLEM } from '@/graphql/problem/mutations' import { GET_PROBLEM } from '@/graphql/problem/queries' -import { GET_TAGS } from '@/graphql/problem/queries' import { useMutation, useQuery } from '@apollo/client' import type { Sample, @@ -35,10 +34,6 @@ import { editSchema } from '../../utils' export default function Page({ params }: { params: { id: string } }) { const { id } = params - const { data: tagsData } = useQuery(GET_TAGS) - const tags = - tagsData?.getTags.map(({ id, name }) => ({ id: +id, name })) ?? [] - const router = useRouter() const methods = useForm({ @@ -145,7 +140,7 @@ export default function Page({ params }: { params: { id: string } }) { return (
-
+
@@ -157,9 +152,9 @@ export default function Page({ params }: { params: { id: string } }) { className="flex w-[760px] flex-col gap-6" > -
+
- + @@ -168,8 +163,8 @@ export default function Page({ params }: { params: { id: string } }) {
- - + + @@ -220,7 +215,7 @@ export default function Page({ params }: { params: { id: string } }) { - + - - -
    -
  • For contest, 'hidden' is recommended.
  • -
  • You can edit these settings later.
  • + +
      +
    • + If set to visible, the problem will be publicly accessible, allowing + users to attempt solving it. +
    • +
    • + Please note that the visibility settings can be modified at any + time. +
    diff --git a/apps/frontend/app/admin/problem/_components/VisibleForm.tsx b/apps/frontend/app/admin/problem/_components/VisibleForm.tsx index 2176d77544..1c31e1e9ec 100644 --- a/apps/frontend/app/admin/problem/_components/VisibleForm.tsx +++ b/apps/frontend/app/admin/problem/_components/VisibleForm.tsx @@ -17,20 +17,16 @@ export default function VisibleForm() { return ( <>
    -
    +
    diff --git a/apps/frontend/app/admin/problem/create/page.tsx b/apps/frontend/app/admin/problem/create/page.tsx index 24dd9dbde0..0e8c65b1dc 100644 --- a/apps/frontend/app/admin/problem/create/page.tsx +++ b/apps/frontend/app/admin/problem/create/page.tsx @@ -3,8 +3,7 @@ import { Button } from '@/components/ui/button' import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area' import { CREATE_PROBLEM } from '@/graphql/problem/mutations' -import { GET_TAGS } from '@/graphql/problem/queries' -import { useMutation, useQuery } from '@apollo/client' +import { useMutation } from '@apollo/client' import { Level, type CreateProblemInput, @@ -33,10 +32,6 @@ import VisibleForm from '../_components/VisibleForm' import { createSchema } from '../utils' export default function Page() { - const { data: tagsData } = useQuery(GET_TAGS) - const tags = - tagsData?.getTags.map(({ id, name }) => ({ id: Number(id), name })) ?? [] - const [isCreating, setIsCreating] = useState(false) const router = useRouter() @@ -83,7 +78,7 @@ export default function Page() { return (
    -
    +
    @@ -95,9 +90,9 @@ export default function Page() { className="flex w-[760px] flex-col gap-6" > -
    +
    - + @@ -106,8 +101,8 @@ export default function Page() {
    - - + + @@ -149,12 +144,10 @@ export default function Page() { - + + + + - -