Skip to content

Commit

Permalink
Organized imports for all files
Browse files Browse the repository at this point in the history
  • Loading branch information
Highfire1 committed Sep 13, 2024
1 parent e69f309 commit fd4dc24
Show file tree
Hide file tree
Showing 26 changed files with 66 additions and 128 deletions.
27 changes: 6 additions & 21 deletions frontend/src/app/EventsOnHomePage/Carosel.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
import * as React from "react"
import * as React from "react";

import { Card, CardContent } from "@/components/ui/card"
import {
Carousel,
CarouselContent,
CarouselItem,
CarouselNext,
CarouselPrevious,
type CarouselApi,
} from "@/components/ui/carousel"

import { experimental_useEffectEvent, useEffect, useState } from "react";
import { useAppDispatch, useAppSelector } from "../hooks/hooks";
type CarouselApi
} from "@/components/ui/carousel";

import { useState } from "react";
import { useAppDispatch } from "../hooks/hooks";
import { SetCurrentPage } from "../slices/pageSlice";

// import { fetchEventsAsync } from "../thunks/EventThunks";
import { AppDispatch } from "../stores/store";
// import { CalendarEvent, DefaultCalendarEvent, SetCalendarEvents, SetCurrentEvent, SetFetchIntervalStarted, selectEvent } from "../slices/eventSlice";
import { Timer } from "../hacks/Timer";
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuItem, DropdownMenuContent } from "@/components/ui/dropdown-menu";
import Conditional from "../Conditional";
import IconLabel from "../IconLabel";
import { useRouter } from "next/navigation";
import Image from "next/image"
import { Button } from "@/components/ui/button";
import { Select, SelectItem, SelectTrigger, SelectContent } from "@/components/ui/select";
import EventInstance from "./EventForCarousel"

// interface EventsProps {
// // Events: CalendarEvent[];
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/app/EventsOnHomePage/Decision.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react';
import EventsSection from './EventeSection';
import { useEffect, useState } from 'react';
import { CarouselMy } from './Carosel';
import EventsSection from './EventeSection';

function Decision() {
const [isWideScreen, setIsWideScreen] = useState(false);
Expand Down
9 changes: 4 additions & 5 deletions frontend/src/app/EventsOnHomePage/Event.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import Image from "next/image";
import { CalendarEvent, SetCurrentEvent, selectEvent } from "../slices/eventSlice";
import IconLabel from "../IconLabel";
import { useState } from "react";
import { useSelector } from "react-redux";
import { useAppDispatch } from "../hooks/hooks";
import { useState } from "react";
import IconLabel from "../IconLabel";
import { CalendarEvent, SetCurrentEvent, selectEvent } from "../slices/eventSlice";

import { Button } from "@/components/ui/button";
import {
Dialog,
DialogClose,
Expand All @@ -15,8 +16,6 @@ import {
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
import { Button } from "@/components/ui/button";
import { useRouter } from "next/navigation";
import router from "next/router";


Expand Down
21 changes: 5 additions & 16 deletions frontend/src/app/EventsOnHomePage/EventForCarousel.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import Image from "next/image";
import { CalendarEvent, SetCurrentEvent, selectEvent } from "../slices/eventSlice";
import IconLabel from "../IconLabel";
import { useState } from "react";
import { useSelector } from "react-redux";
import { useAppDispatch } from "../hooks/hooks";
import { useState } from "react";


import IconLabel from "../IconLabel";
import { CalendarEvent, SetCurrentEvent, selectEvent } from "../slices/eventSlice";

import { Button } from "@/components/ui/button";
import {
Dialog,
DialogClose,
Expand All @@ -17,21 +16,11 @@ import {
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
import { Button } from "@/components/ui/button";
import { useRouter } from "next/navigation";
import router from "next/router";



import { Card, CardContent } from "@/components/ui/card"
import {
Carousel,
CarouselContent,
CarouselItem,
CarouselNext,
CarouselPrevious,
type CarouselApi,
} from "@/components/ui/carousel"
import { Card, CardContent } from "@/components/ui/card";



Expand Down
4 changes: 2 additions & 2 deletions frontend/src/app/EventsOnHomePage/EventeSection.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useAppDispatch, useAppSelector } from "../hooks/hooks";
import { SetCurrentPage } from "../slices/pageSlice";
import { useRouter } from "next/navigation";
import { useAppDispatch } from "../hooks/hooks";
import { SetCurrentPage } from "../slices/pageSlice";

export class Range {
Start: number;
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/app/ExecProfile.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import {Component} from "react";
import * as Dialog from "@radix-ui/react-dialog";
import Image from "next/image";
import {useState, useEffect} from "react";
import { useEffect, useState } from "react";
import ProfileModal from "./ProfileModal";
import * as Dialog from "@radix-ui/react-dialog";


interface ExecProfileProps
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/ExecProfiles.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useState } from "react";
import ExecProfile from "./ExecProfile";
import { useAppSelector } from './hooks/hooks';
import { selectProfile, ExecProfileObject } from './slices/execProfileSlice';
import { ExecProfileObject, selectProfile } from './slices/execProfileSlice';

export default function ExecProfiles() {
const profiles = useAppSelector(selectProfile);
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/app/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Button } from "@/components/ui/button";
import { useRouter } from "next/navigation";
import React, { useEffect, useMemo, useState } from "react";
import React, { useMemo, useState } from "react";
import SocialIcons from "./SocialIcons";
import { setServers } from "dns";

export default function Footer() {
const forms = {
Expand Down
17 changes: 6 additions & 11 deletions frontend/src/app/HomePage.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
"use client";

import { Component, useEffect } from "react";
import { Global, Vector2D } from "@/app/Global";
import SocialIcons from "@/app/SocialIcons";
import { useAppDispatch, useAppSelector } from "./hooks/hooks";
import { AddExecProfile, ExecProfileObject, selectProfile } from "./slices/execProfileSlice";
import { AppDispatch, RootState } from "./stores/store";
import { loadProfilesAsync } from "./thunks/ProfileThunks";
import { UnknownAction } from "@reduxjs/toolkit";
import { SetCurrentPage } from "./slices/pageSlice";
import Footer from "./Footer";
import Image from "next/image"
import codeSnippet from "../../public/code_snippet.png"
import { useEffect } from "react";
import Decision from "./EventsOnHomePage/Decision";
import AboutUsSection from "./aboutus";
import { useAppDispatch, useAppSelector } from "./hooks/hooks";
import { AddExecProfile, ExecProfileObject, selectProfile } from "./slices/execProfileSlice";
import { SetCurrentPage } from "./slices/pageSlice";
import { AppDispatch } from "./stores/store";
import { loadProfilesAsync } from "./thunks/ProfileThunks";


let InstanceCount: number = 0;
Expand Down
10 changes: 4 additions & 6 deletions frontend/src/app/Menu.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import React, { useState, FC } from 'react';
import * as FaIcons from 'react-icons/fa';
import SocialIcons from './SocialIcons';
import NavButton from './NavButton';
import { useRouter } from "next/navigation";
import { useState } from 'react';
import * as FaIcons from 'react-icons/fa';
import { useSelector } from "react-redux";
import { useAppDispatch } from "./hooks/hooks";
import { SetCurrentPage, selectCurrentPage } from "./slices/pageSlice";
import { useSelector } from "react-redux";
import { AppDispatch } from "./stores/store";
import SocialIcons from './SocialIcons';

interface MenuProps
{
Expand Down
14 changes: 5 additions & 9 deletions frontend/src/app/NavBar.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
"use client";

import React, { Component, useContext, useState } from "react";
import NavButton from "./NavButton";
import { Global, Vector2D } from "@/app/Global";
import { Button } from "@/components/ui/button";
import { useRouter } from "next/navigation";
import { useState } from "react";
import { useSelector } from "react-redux";
import { useAppDispatch } from "./hooks/hooks";
import Menu from "./Menu";
import NavButton from "./NavButton";
import { SetCurrentPage, selectCurrentPage } from "./slices/pageSlice";
import { useSelector } from "react-redux";
import { AppDispatch } from "./stores/store";
import { waitForDebugger } from "inspector";
import { Button } from "@/components/ui/button";
import Conditional from "./Conditional";
import SocialIcons from "./SocialIcons";
import Menu from "./Menu";


interface NavBarProps {
Expand Down
5 changes: 0 additions & 5 deletions frontend/src/app/NavButton.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
"use client";

import {Component} from "react";
import {Global} from "@/app/Global";
import {redirect} from "next/navigation";
import { useAppSelector } from "./hooks/hooks";
import { selectCurrentPage } from "./slices/pageSlice";

interface NavButtonProps
{
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/app/ProfileModal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { defaultHead } from 'next/head';
import React, { useState, useEffect } from 'react';
import Image from "next/image";
import * as Dialog from "@radix-ui/react-dialog";
import Image from "next/image";
import { useEffect, useState } from 'react';

interface ProfileModalProps {
ID: String;
Expand Down
1 change: 0 additions & 1 deletion frontend/src/app/SocialIcons.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use client";

import { SocialIcon } from "react-social-icons";
import { Component } from "react";

interface SocialIconsProps {
height?: number,
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/app/about/AboutPage.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"use client";

import {Component, useEffect, useState} from "react";
import { UnknownAction } from "@reduxjs/toolkit";
import { useEffect, useState } from "react";
import Conditional from "../Conditional";
import ExecProfiles from "../ExecProfiles";
import { useAppDispatch, useAppSelector } from "../hooks/hooks";
import { AddExecProfile, ExecProfileObject, selectProfile } from "../slices/execProfileSlice";
import { loadProfilesAsync } from "../thunks/ProfileThunks";
import { AppDispatch } from "../stores/store";
import { UnknownAction } from "@reduxjs/toolkit";
import { SetCurrentPage } from "../slices/pageSlice";
import Conditional from "../Conditional";
import { AppDispatch } from "../stores/store";
import { loadProfilesAsync } from "../thunks/ProfileThunks";

interface AboutPageProps
{}
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/app/events/Event.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import Image from "next/image";
import { CalendarEvent, SetCurrentEvent, selectEvent } from "../slices/eventSlice";
import IconLabel from "../IconLabel";
import { useState } from "react";
import { useSelector } from "react-redux";
import { useAppDispatch } from "../hooks/hooks";
import { useState } from "react";
import IconLabel from "../IconLabel";
import { CalendarEvent, SetCurrentEvent, selectEvent } from "../slices/eventSlice";

import { Button } from "@/components/ui/button";
import {
Dialog,
DialogClose,
Expand All @@ -14,8 +15,7 @@ import {
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
import { Button } from "@/components/ui/button";
} from "@/components/ui/dialog";
import { useRouter } from "next/navigation";

interface EventProps
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/app/events/EventsLuma.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useAppDispatch, useAppSelector } from "../hooks/hooks";
import { SetCurrentPage } from "../slices/pageSlice";
import { useRouter } from "next/navigation";
import { useAppDispatch } from "../hooks/hooks";
import { SetCurrentPage } from "../slices/pageSlice";

export default function EventsSection() {
const router = useRouter();
Expand Down
8 changes: 2 additions & 6 deletions frontend/src/app/events/EventsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import { experimental_useEffectEvent, useEffect, useState } from "react";
import { useAppDispatch, useAppSelector } from "../hooks/hooks";
import { useState } from "react";
import { useAppDispatch } from "../hooks/hooks";
import { SetCurrentPage } from "../slices/pageSlice";
import Events from "./Events";
// import { fetchEventsAsync } from "../thunks/EventThunks";
import { AppDispatch } from "../stores/store";
// import { CalendarEvent, DefaultCalendarEvent, SetCalendarEvents, SetCurrentEvent, SetFetchIntervalStarted, selectEvent } from "../slices/eventSlice";
import Conditional from "../Conditional";
import { useRouter } from "next/navigation";
import { Select, SelectItem, SelectTrigger, SelectContent } from "@/components/ui/select";
import EventsLuma from './EventsLuma';

export class Range {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/events/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"use client";

import { Provider } from "react-redux";
import Footer from "../Footer";
import NavBar from "../NavBar";
import { store } from "../stores/store";
import EventsPage from "./EventsPage";
import Footer from "../Footer";

export default function Page()
{
Expand Down
15 changes: 4 additions & 11 deletions frontend/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
"use client";

import Image from 'next/image'
import NavBar from './NavBar';
import { Component } from "react";
import { useEffect, useState } from 'react';
import { Provider } from 'react-redux';
import Footer from './Footer';
import HomePage from './HomePage';
import { Global } from "@/app/Global";
import { ThemeProvider } from 'next-themes';
import { Provider, ProviderProps } from 'react-redux'
import NavBar from './NavBar';
import { store } from './stores/store';
import Footer from './Footer';
import EventsSection from './EventsOnHomePage/EventeSection';
import { useEffect, useState, useRef } from 'react';
import AboutUsSection from './aboutus'

import Decision from './EventsOnHomePage/Decision';



Expand Down
1 change: 0 additions & 1 deletion frontend/src/app/resources/Body.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {Timer} from "@/app/hacks/Timer";
import SocialIcons from "@/app/SocialIcons";

export function Body()
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/app/resources/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import {useState} from "react";
import {IconLabel} from "@/app/hacks/IconLabel";
import Image from "next/image"
import profile from "../../../public/LCS.png"
import Image from "next/image";
import profile from "../../../public/LCS.png";


export function Header()
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/resources/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Body } from "./Body";
import { Header } from "./Header";
import {Body} from "./Body";

export default function Page()
{
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/app/slices/execProfileSlice.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { AppDispatch, RootState } from "../stores/store";
import { PayloadAction, createSlice } from "@reduxjs/toolkit";
import { CalendarEvent } from "./eventSlice";
import { AppDispatch, RootState } from "../stores/store";
interface ExecPosition
{
ID: number;
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/app/stores/store.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { configureStore } from "@reduxjs/toolkit";
import execProfileReducer from "../slices/execProfileSlice"
import pageReducer from "../slices/pageSlice";
import eventsReducer from "../slices/eventSlice";
import execProfileReducer from "../slices/execProfileSlice";
import pageReducer from "../slices/pageSlice";

export const store = configureStore({
reducer: {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ui/button.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react"
import { Slot } from "@radix-ui/react-slot"
import { cva, type VariantProps } from "class-variance-authority"
import * as React from "react"

import { cn } from "@/lib/utils"

Expand Down

0 comments on commit fd4dc24

Please sign in to comment.