Skip to content

Commit 27fd622

Browse files
committed
updated imports
1 parent 6eb5287 commit 27fd622

File tree

3 files changed

+2
-67
lines changed

3 files changed

+2
-67
lines changed

app/api/[roomcode]/route.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1+
import { RoomCodeRouteContext } from '@/lib/types'
12
import clientPromise from '@/utils/newdb'
23

3-
type RoomCodeRouteContext = {
4-
params: {
5-
roomcode: string
6-
}
7-
}
8-
9-
export async function GET(request: Request, context: RoomCodeRouteContext) {
4+
export async function GET(_request: Request, context: RoomCodeRouteContext) {
105
try {
116
const client = await clientPromise
127
const db = client.db('get_interval')

lib/hooks.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { useState, useRef, useEffect } from 'react'
22
import { API } from './api'
33
import { FormData, MemberData, SetFormData } from './types'
44
import { intervals, timeIntervals } from './utils'
5-
import { useRouter } from 'next/navigation'
65

76
export const GetResult = (roomCode: string) => {
87
const [result, setResult] = useState<number[][]>([])

lib/utils.ts

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -7,65 +7,6 @@ export const timeIntervals = [480, 600]
77

88
export const intervals: number[][] = [timeIntervals]
99

10-
export const membersData = [
11-
{
12-
id: 0,
13-
roomCode: 'ahd-kjha-hjah',
14-
name: 'Anushree',
15-
intervals: [
16-
[0, 839],
17-
[901, 1079],
18-
[1381, 1439],
19-
],
20-
},
21-
{
22-
id: 1,
23-
roomCode: 'ahd-kjha-hjah',
24-
name: 'Ishank',
25-
intervals: [
26-
[0, 659],
27-
[901, 1259],
28-
],
29-
},
30-
{
31-
id: 2,
32-
roomCode: 'ahd-kjha-hjah',
33-
name: 'Shubh',
34-
intervals: [
35-
[0, 540],
36-
[750, 839],
37-
],
38-
},
39-
{
40-
id: 0,
41-
roomCode: 'ahd-kjha-hjah',
42-
name: 'Anushree',
43-
intervals: [
44-
[0, 839],
45-
[901, 1079],
46-
[1381, 1439],
47-
],
48-
},
49-
{
50-
id: 1,
51-
roomCode: 'ahd-kjha-hjah',
52-
name: 'Ishank',
53-
intervals: [
54-
[0, 659],
55-
[901, 1259],
56-
],
57-
},
58-
{
59-
id: 2,
60-
roomCode: 'ahd-kjha-hjah',
61-
name: 'Shubh',
62-
intervals: [
63-
[0, 540],
64-
[750, 839],
65-
],
66-
},
67-
]
68-
6910
export function NumToTime(num: number) {
7011
var hours = Math.floor(num / 60).toString()
7112
var minutes: string = (num % 60).toString()

0 commit comments

Comments
 (0)