-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 1269-add-bruno-docs-convention
- Loading branch information
Showing
16 changed files
with
863 additions
and
193 deletions.
There are no files selected for viewing
108 changes: 0 additions & 108 deletions
108
frontend-client/app/problem/[id]/_components/Description.tsx
This file was deleted.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
frontend-client/app/problem/[id]/_components/DescriptionLoading.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,51 @@ | ||
import Skeleton from '@/components/ui/skeleton' | ||
|
||
export default function DescriptionLoading() { | ||
return ( | ||
<div className="flex h-fit flex-col gap-4 p-6 text-lg"> | ||
<Skeleton className="h-7 w-32 bg-slate-900" /> | ||
<div className="flex flex-col gap-1 "> | ||
<Skeleton className="h-4 w-full bg-slate-900" /> | ||
<Skeleton className="h-4 w-full bg-slate-900" /> | ||
<Skeleton className="h-4 w-full bg-slate-900" /> | ||
</div> | ||
|
||
{/*input*/} | ||
<Skeleton className="h-7 w-16 bg-slate-900" /> | ||
<div className="flex flex-col gap-1"> | ||
<Skeleton className="h-4 w-full bg-slate-900" /> | ||
<Skeleton className="h-4 w-full bg-slate-900" /> | ||
<Skeleton className="h-4 w-full bg-slate-900" /> | ||
</div> | ||
{/*output*/} | ||
<Skeleton className="h-7 w-20 bg-slate-900" /> | ||
<div className="flex flex-col gap-1"> | ||
<Skeleton className="h-4 w-full bg-slate-900" /> | ||
<Skeleton className="h-4 w-full bg-slate-900" /> | ||
<Skeleton className="h-4 w-full bg-slate-900" /> | ||
</div> | ||
{/*sample input*/} | ||
<div className="flex items-center justify-between"> | ||
<Skeleton className="h-7 w-40 bg-slate-900" /> | ||
<Skeleton className="h-[23px] w-5 bg-slate-900" /> | ||
</div> | ||
<Skeleton className="h-24 w-full bg-slate-900" /> | ||
{/*sample output*/} | ||
<Skeleton className="h-7 w-40 bg-slate-900" /> | ||
<Skeleton className="h-24 w-full bg-slate-900" /> | ||
{/*other things*/} | ||
<Skeleton className="h-7 w-40 bg-slate-900" /> | ||
<Skeleton className="h-7 w-40 bg-slate-900" /> | ||
<Skeleton className="h-7 w-40 bg-slate-900" /> | ||
<div className="mt-5 flex gap-2 "> | ||
<Skeleton className="h-7 w-12 bg-slate-900" /> | ||
<Skeleton className="h-7 w-12 rounded-full bg-slate-900" /> | ||
</div> | ||
<br /> | ||
<div className="mt-5 flex gap-3"> | ||
<Skeleton className="h-8 w-8 bg-slate-900" /> | ||
<Skeleton className="h-8 w-20 bg-slate-900" /> | ||
</div> | ||
</div> | ||
) | ||
} |
50 changes: 50 additions & 0 deletions
50
frontend-client/app/problem/[id]/_components/EditorHeader.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,50 @@ | ||
'use client' | ||
|
||
import SelectScrollable from '@/app/problem/[id]/_components/SelectScrollable' | ||
import { Button } from '@/components/ui/button' | ||
import { fetcherWithAuth } from '@/lib/utils' | ||
import type { ProblemDetail } from '@/types/type' | ||
import { TbReload } from 'react-icons/tb' | ||
|
||
interface ProblemEditorProps { | ||
data: ProblemDetail | ||
langValue: string | undefined | ||
} | ||
|
||
export default function Editor({ data, langValue }: ProblemEditorProps) { | ||
return ( | ||
<div className="flex shrink-0 items-center justify-between border-b border-b-slate-600 px-5"> | ||
<div className="cursor-pointer text-lg font-bold">Editor</div> | ||
<div className="flex items-center gap-3"> | ||
<Button size="icon" className="size-7 shrink-0 rounded-md bg-slate-500"> | ||
<TbReload className="size-4" /> | ||
</Button> | ||
<Button | ||
className="bg-primary h-7 shrink-0 rounded-md px-2 font-semibold" | ||
onClick={async () => { | ||
const res = await fetcherWithAuth.post('submission', { | ||
json: { | ||
language: langValue, | ||
code: [ | ||
{ | ||
id: 1, | ||
text: '#include <stdio.h>\nint main() { int a, b; scanf("%d%d", &a, &b); printf("%d\\n", a + b);}', | ||
locked: false | ||
} | ||
] | ||
}, | ||
searchParams: { | ||
problemId: data.id // 문제 ID | ||
} | ||
}) | ||
const submission = await res.json() | ||
return submission | ||
}} | ||
> | ||
Submit | ||
</Button> | ||
<SelectScrollable languages={data.languages} /> | ||
</div> | ||
</div> | ||
) | ||
} |
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
130 changes: 72 additions & 58 deletions
130
frontend-client/app/problem/[id]/_components/MainResizablePanel.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
Oops, something went wrong.