Skip to content

Commit 4aed92b

Browse files
authored
Merge pull request #52 from coderKrysio/dev-1
used prettier
2 parents 9a7f26f + fe66eb8 commit 4aed92b

File tree

4 files changed

+16
-81
lines changed

4 files changed

+16
-81
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,45 @@
44

55
![Home Page](https://github.com/coderKrysio/get-interval/assets/91840205/9b64386c-ae0b-4508-85a1-810e858031e3)
66

7-
87
### Introduction:
8+
99
Welcome to our innovative web application powered by Next.js, Tailwind CSS, and MongoDB! Our platform is designed to streamline scheduling and make coordinating busy time slots a breeze. With our user-friendly interface and powerful features, you can generate a private room where up to 15 users can input their busy time intervals collaboratively. The application then processes the data and presents a cohesive timeline showcasing the common free time slots for all participants. To maintain privacy and efficiency, each private room has a two-hour timer after which the data is automatically deleted from the database.
1010

1111
### Aim:
12+
1213
Our aim is to simplify the process of finding common free time slots among a group of users. By providing a secure and easy-to-use platform, we enable teams, organizations, and friends to effortlessly schedule meetings, events, or any other group activities without the hassle of back-and-forth communication.
1314

1415
### How to Use:
1516

1617
![Form Page](https://github.com/coderKrysio/get-interval/assets/91840205/5b5d73a8-3e69-4656-8ee6-e74c6269e3a3)
1718

18-
* **Create a Private Room using Generate Form Link**: Upon accessing the application, you'll have the option to create a new private room. Choose a room name and set the maximum number of users allowed (up to 15).
19+
- **Create a Private Room using Generate Form Link**: Upon accessing the application, you'll have the option to create a new private room. Choose a room name and set the maximum number of users allowed (up to 15).
1920

20-
* **Share the Room Link**: Share the generated private room link with the intended participants. Only those with the link can access the room, ensuring privacy and exclusivity.
21+
- **Share the Room Link**: Share the generated private room link with the intended participants. Only those with the link can access the room, ensuring privacy and exclusivity.
2122

22-
* **Input Busy Time Slots**: Each participant can input their busy time slots by specifying the start and end times for their commitments using the intuitive interface.
23+
- **Input Busy Time Slots**: Each participant can input their busy time slots by specifying the start and end times for their commitments using the intuitive interface.
2324

24-
* **View Common Free Time Slots**: As users input their busy time intervals, the application dynamically calculates and displays the common free time slots for all participants on an interactive timeline.
25+
- **View Common Free Time Slots**: As users input their busy time intervals, the application dynamically calculates and displays the common free time slots for all participants on an interactive timeline.
2526

26-
* **Collaborate and Finalize Plans**: Utilize the timeline to identify the optimal time slots where everyone is available. Collaborate with the group and finalize your plans with ease.
27+
- **Collaborate and Finalize Plans**: Utilize the timeline to identify the optimal time slots where everyone is available. Collaborate with the group and finalize your plans with ease.
2728

2829
### Unique Features:
2930

3031
![Result Page](https://github.com/coderKrysio/get-interval/assets/91840205/c5cfe923-64e8-4094-a96b-4c70b44bc77d)
3132

33+
- **All-in-One Next.js Platform**: Our application is built entirely on Next.js, combining the front end and API in one seamless package. This ensures a smoother and more responsive user experience.
3234

33-
* **All-in-One Next.js Platform**: Our application is built entirely on Next.js, combining the front end and API in one seamless package. This ensures a smoother and more responsive user experience.
34-
35-
* **User-Friendly Interface**: The clean and intuitive user interface makes it effortless for participants to input their busy time slots and view the common free time slots.
35+
- **User-Friendly Interface**: The clean and intuitive user interface makes it effortless for participants to input their busy time slots and view the common free time slots.
3636

37-
* **Privacy & Security**: Each private room is accessible only through a unique link, safeguarding your data and ensuring that only authorized users can join and contribute.
37+
- **Privacy & Security**: Each private room is accessible only through a unique link, safeguarding your data and ensuring that only authorized users can join and contribute.
3838

39-
* **Automatic Data Deletion**: To respect your privacy, the data within each private room is automatically deleted after a two-hour period, minimizing any data retention concerns.
39+
- **Automatic Data Deletion**: To respect your privacy, the data within each private room is automatically deleted after a two-hour period, minimizing any data retention concerns.
4040

41-
* **Scalability for Groups**: With support for up to 15 users in a single private room, our application caters to both small and larger groups, making it ideal for teams and organizations of all sizes.
41+
- **Scalability for Groups**: With support for up to 15 users in a single private room, our application caters to both small and larger groups, making it ideal for teams and organizations of all sizes.
4242

43-
* **Interactive Timeline**: The timeline feature provides a visual representation of overlapping free time slots, simplifying the process of finding suitable meeting times.
43+
- **Interactive Timeline**: The timeline feature provides a visual representation of overlapping free time slots, simplifying the process of finding suitable meeting times.
4444

45-
* **Real-Time Updates**: As participants add their busy time slots, the timeline updates in real-time, facilitating seamless collaboration and quick decision-making.
45+
- **Real-Time Updates**: As participants add their busy time slots, the timeline updates in real-time, facilitating seamless collaboration and quick decision-making.
4646

4747
Get started with our Next.js, Tailwind, and MongoDB-powered web application today and revolutionize the way you schedule group activities! Say goodbye to scheduling conflicts and hello to efficient planning.
4848

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)