Skip to content

Commit c61403b

Browse files
committed
Add skeleton page for collab service
1 parent 0a893d4 commit c61403b

File tree

6 files changed

+87
-49
lines changed

6 files changed

+87
-49
lines changed

frontend/src/app/collab/page.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import ContentPage from "../components/collab/ContentPage";
2+
import SessionHeader from "../components/collab/SessionHeader";
3+
4+
export default function CollabPage() {
5+
return (
6+
<main className="bg-stone-900 h-screen flex flex-col items-center">
7+
<SessionHeader />
8+
<ContentPage />
9+
</main>
10+
);
11+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export default function ContentPage() {
2+
return (
3+
<div className="text-white flex h-full w-full">
4+
{/* Question Section */}
5+
<div className="bg-stone-800 h-full w-[25%]"></div>
6+
7+
{/* Coding Section */}
8+
<div className="h-full w-[50%]"></div>
9+
10+
{/* Chat Section */}
11+
12+
<div className="bg-stone-800 h-full w-[25%]"></div>
13+
</div>
14+
);
15+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default function SessionHeader() {
2+
return (
3+
<header className="bg-stone-800 w-full h-[5%] text-white border-b-2 border-stone-700">
4+
Session Header
5+
</header>
6+
);
7+
}

frontend/src/app/components/match/SearchComponent.tsx

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,37 @@
22

33
import { useState } from "react";
44
import { Button } from "@/components/ui/button";
5-
import { Spinner } from '@/components/ui/shadcn-io/spinner';
6-
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog";
5+
import { Spinner } from "@/components/ui/shadcn-io/spinner";
6+
import {
7+
Dialog,
8+
DialogContent,
9+
DialogDescription,
10+
DialogHeader,
11+
DialogTitle,
12+
DialogTrigger,
13+
} from "@/components/ui/dialog";
714

815
export default function SearchComponent() {
16+
const [searchStatus, setSearchStatus] = useState(false);
917

10-
const [searchStatus, setSearchStatus] = useState(false);
18+
function initializeSearch() {
19+
setSearchStatus(true);
20+
}
1121

12-
function initializeSearch() {
13-
setSearchStatus(true);
14-
}
15-
16-
return (
17-
<Dialog>
18-
<DialogTrigger asChild>
19-
<Button className="mb-15 w-[80%] bg-black text-white" variant="outline">Start Searching</Button>
20-
</DialogTrigger>
21-
<DialogContent className="w-[30%] flex flex-col items-center">
22-
<DialogHeader className="flex items-center">
23-
<DialogTitle>Searching for a match....</DialogTitle>
24-
<DialogDescription>
25-
Hold on tight .....
26-
</DialogDescription>
27-
</DialogHeader>
28-
<Spinner variant="circle-filled"/>
29-
</DialogContent>
30-
</Dialog>
31-
);
22+
return (
23+
<Dialog>
24+
<DialogTrigger asChild>
25+
<Button className="mb-15 w-[80%] bg-black text-white" variant="outline">
26+
Start Searching
27+
</Button>
28+
</DialogTrigger>
29+
<DialogContent className="w-[30%] flex flex-col items-center">
30+
<DialogHeader className="flex items-center">
31+
<DialogTitle>Searching for a match....</DialogTitle>
32+
<DialogDescription>Hold on tight .....</DialogDescription>
33+
</DialogHeader>
34+
<Spinner variant="circle-filled" />
35+
</DialogContent>
36+
</Dialog>
37+
);
3238
}

frontend/src/app/match/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import DifficultyComponent from "../components/match/DifficultyComponent";
33
import SearchComponent from "../components/match/SearchComponent";
44

55
export default function MatchPage() {
6-
76
return (
87
<div className="h-screen flex flex-col items-center justify-center">
98
<div className="text-center">

frontend/src/components/ui/shadcn-io/spinner/index.tsx

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ import {
33
LoaderIcon,
44
LoaderPinwheelIcon,
55
type LucideProps,
6-
} from 'lucide-react';
7-
import { cn } from '@/lib/utils';
6+
} from "lucide-react";
7+
import { cn } from "@/lib/utils";
88

9-
type SpinnerVariantProps = Omit<SpinnerProps, 'variant'>;
9+
type SpinnerVariantProps = Omit<SpinnerProps, "variant">;
1010

1111
const Default = ({ className, ...props }: SpinnerVariantProps) => (
12-
<LoaderIcon className={cn('animate-spin', className)} {...props} />
12+
<LoaderIcon className={cn("animate-spin", className)} {...props} />
1313
);
1414

1515
const Circle = ({ className, ...props }: SpinnerVariantProps) => (
16-
<LoaderCircleIcon className={cn('animate-spin', className)} {...props} />
16+
<LoaderCircleIcon className={cn("animate-spin", className)} {...props} />
1717
);
1818

1919
const Pinwheel = ({ className, ...props }: SpinnerVariantProps) => (
20-
<LoaderPinwheelIcon className={cn('animate-spin', className)} {...props} />
20+
<LoaderPinwheelIcon className={cn("animate-spin", className)} {...props} />
2121
);
2222

2323
const CircleFilled = ({
@@ -28,13 +28,13 @@ const CircleFilled = ({
2828
<div className="relative" style={{ width: size, height: size }}>
2929
<div className="absolute inset-0 rotate-180">
3030
<LoaderCircleIcon
31-
className={cn('animate-spin', className, 'text-foreground opacity-20')}
31+
className={cn("animate-spin", className, "text-foreground opacity-20")}
3232
size={size}
3333
{...props}
3434
/>
3535
</div>
3636
<LoaderCircleIcon
37-
className={cn('relative animate-spin', className)}
37+
className={cn("relative animate-spin", className)}
3838
size={size}
3939
{...props}
4040
/>
@@ -223,8 +223,8 @@ const Infinite = ({ size = 24, ...props }: SpinnerVariantProps) => (
223223
strokeLinecap="round"
224224
strokeWidth="10"
225225
style={{
226-
transform: 'scale(0.8)',
227-
transformOrigin: '50px 50px',
226+
transform: "scale(0.8)",
227+
transformOrigin: "50px 50px",
228228
}}
229229
>
230230
<animate
@@ -240,31 +240,31 @@ const Infinite = ({ size = 24, ...props }: SpinnerVariantProps) => (
240240

241241
export type SpinnerProps = LucideProps & {
242242
variant?:
243-
| 'default'
244-
| 'circle'
245-
| 'pinwheel'
246-
| 'circle-filled'
247-
| 'ellipsis'
248-
| 'ring'
249-
| 'bars'
250-
| 'infinite';
243+
| "default"
244+
| "circle"
245+
| "pinwheel"
246+
| "circle-filled"
247+
| "ellipsis"
248+
| "ring"
249+
| "bars"
250+
| "infinite";
251251
};
252252

253253
export const Spinner = ({ variant, ...props }: SpinnerProps) => {
254254
switch (variant) {
255-
case 'circle':
255+
case "circle":
256256
return <Circle {...props} />;
257-
case 'pinwheel':
257+
case "pinwheel":
258258
return <Pinwheel {...props} />;
259-
case 'circle-filled':
259+
case "circle-filled":
260260
return <CircleFilled {...props} />;
261-
case 'ellipsis':
261+
case "ellipsis":
262262
return <Ellipsis {...props} />;
263-
case 'ring':
263+
case "ring":
264264
return <Ring {...props} />;
265-
case 'bars':
265+
case "bars":
266266
return <Bars {...props} />;
267-
case 'infinite':
267+
case "infinite":
268268
return <Infinite {...props} />;
269269
default:
270270
return <Default {...props} />;

0 commit comments

Comments
 (0)