Skip to content

Commit

Permalink
test fixes of imports
Browse files Browse the repository at this point in the history
  • Loading branch information
sidlak-c137 committed Oct 1, 2023
1 parent 428be5b commit 07cc715
Show file tree
Hide file tree
Showing 18 changed files with 36 additions and 49 deletions.
2 changes: 1 addition & 1 deletion Context/AuthContext.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createContext, useContext, useEffect, useState } from "react"

import { GithubAuthProvider, GoogleAuthProvider, signInWithPopup } from "firebase/auth"
import { auth } from "back_end/utils"
import { auth } from "@/back_end/utils"

// @ts-ignore
import { checkAdmin } from "@/utils/api";
Expand Down
18 changes: 5 additions & 13 deletions components/AdminForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@ import React, { useEffect, useRef, useState } from "react";
import {
Box,
Button,
Divider,
Heading,
FormControl,
FormLabel,
Input,
Textarea,
VStack,
Flex,
Grid,
Spacer
} from "@chakra-ui/react";

import {
Expand All @@ -22,14 +16,12 @@ import {
personTemplate,
projectTemplate,
Value
} from "../devpages/admin";
} from "@/devpages/admin";

import * as ImageService from "../back_end/api/image.js"
import * as EventService from "../back_end/api/events.js"
import * as LeadService from "../back_end/api/leads.js"
import * as ProjectService from "../back_end/api/projects.js"

import { connectStorageEmulator } from "firebase/storage";
import * as ImageService from "@/back_end/api/image.js"
import * as EventService from "@/back_end/api/events.js"
import * as LeadService from "@/back_end/api/leads.js"
import * as ProjectService from "@/back_end/api/projects.js"

type _Item = _Person | _Project | _Event;

Expand Down
2 changes: 1 addition & 1 deletion components/GithubButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Set to be removed
import React from "react";
import { UserCredential } from "firebase/auth";
import { useAuth } from "context/AuthContext"
import { useAuth } from "@/context/AuthContext"
import { Button, Center, Text } from '@chakra-ui/react'
import { VscGithub } from "react-icons/vsc"

Expand Down
2 changes: 1 addition & 1 deletion components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { useMediaQuery } from "@chakra-ui/react";
import { faBars } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { HeaderButton, SpecialHeaderButton } from "./Parts";
import { useAuth } from "context/AuthContext";
import { useAuth } from "@/context/AuthContext";

export default function Header(props: { showSidebar: () => void }) {
const [isLargerThan1200] = useMediaQuery("(min-width: 1200px)");
Expand Down
4 changes: 2 additions & 2 deletions components/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Head from "next/head";
import { Box, Flex, useMediaQuery } from "@chakra-ui/react";
import { ReactElement, useEffect, useState } from "react";
import Header from "../components/Header";
import Footer from "../components/Footer";
import Header from "./Header";
import Footer from "./Footer";
import Sidebar from "./Sidebar";

export default function Layout({ children }: { children: ReactElement }) {
Expand Down
2 changes: 1 addition & 1 deletion components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Flex, IconButton } from "@chakra-ui/react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faXmark } from "@fortawesome/free-solid-svg-icons";
import { SidebarButton } from "./Parts";
import { useAuth } from "context/AuthContext";
import { useAuth } from "@/context/AuthContext";

interface ISideBar {
show: boolean;
Expand Down
3 changes: 1 addition & 2 deletions components/SignInButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
// Set to be removed
import React from "react";
import { UserCredential } from "firebase/auth";
import { useAuth } from "../context/AuthContext"
import { useAuth } from "@/context/AuthContext"
import { Button, Center, Text } from '@chakra-ui/react'
import { VscGithub } from "react-icons/vsc"

import { checkMembership, getGithubUser } from "utils/api"
interface SignInProps {
onSignInSuccess: (result: UserCredential) => void;
}
Expand Down
6 changes: 3 additions & 3 deletions devpages/admin.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@


import { useEffect, useState } from "react";
import AdminForm from "../components/AdminForm";
import AdminForm from "@/components/AdminForm";
import { getAllEvents } from "back_end/api/events";
// import { events, people, projects } from '../utils/data';
import { getLeads } from "back_end/api/leads";
import { getProjects } from "back_end/api/projects";
import { getLeads } from "@/back_end/api/leads";
import { getProjects } from "@/back_end/api/projects";
import { set } from 'firebase/database';


Expand Down
2 changes: 1 addition & 1 deletion devpages/dashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useAuth } from "context/AuthContext";
import { useAuth } from "@/context/AuthContext";
import { useEffect } from "react";
import Router from "next/router";
import { Center, Text } from "@chakra-ui/react";
Expand Down
2 changes: 1 addition & 1 deletion devpages/private_project.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useAuth } from "context/AuthContext";
import { useAuth } from "@/context/AuthContext";
import { useEffect } from "react";
import Router from "next/router";
import { Center, Text } from "@chakra-ui/react";
Expand Down
2 changes: 1 addition & 1 deletion devpages/profile.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useAuth } from "context/AuthContext";
import { useAuth } from "@/context/AuthContext";
import { useEffect } from "react";
import Router from "next/router";
import { Center, Text } from "@chakra-ui/react";
Expand Down
2 changes: 1 addition & 1 deletion devpages/resources.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useAuth } from "context/AuthContext";
import { useAuth } from "@/context/AuthContext";
import { useEffect } from "react";
import Router from "next/router";
import { Center, Text } from "@chakra-ui/react";
Expand Down
4 changes: 2 additions & 2 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import type { AppProps } from "next/app";
import { ChakraProvider } from "@chakra-ui/react";
import { extendTheme, theme as baseTheme } from "@chakra-ui/react";

import Layout from "../components/Layout";
import { AuthContextProvider } from "context/AuthContext";
import Layout from "@/components/Layout";
import { AuthContextProvider } from "@/context/AuthContext";

const colors = {
brand: {
Expand Down
4 changes: 2 additions & 2 deletions pages/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
Spinner,
useMediaQuery,
} from "@chakra-ui/react";
import { getPeople } from "utils/api";
import { IPeopleInfo } from "utils/parsers";
import { getPeople } from "@/utils/api";
import { IPeopleInfo } from "@/utils/parsers";

export default function About() {
// Scroll to top of page
Expand Down
8 changes: 4 additions & 4 deletions pages/events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import {
// @ts-ignore
import { getAllEvents } from "@/utils/api";
import { lazy, useEffect, useState } from "react";
import { IEventInfo } from "utils/parsers";
import EventPanel from "components/EventPanel";
import EventCardFull from "components/EventCardFull";
import { IEventInfo } from "@/utils/parsers";
import EventPanel from "@/components/EventPanel";
import EventCardFull from "@/components/EventCardFull";

const Room = lazy(() => import("components/Room"));
const Room = lazy(() => import("@/components/Room"));
const inter = Inter({ subsets: ["latin"] });

function Title() {
Expand Down
6 changes: 3 additions & 3 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ import { faArrowDown } from "@fortawesome/free-solid-svg-icons";
import { getFeaturedEvents } from "@/utils/api";
import Image from 'next/image';
import { lazy, useEffect, useState } from "react";
import EventCard from "components/EventCard";
import { IEventInfo } from "utils/parsers";
import EventCard from "@/components/EventCard";
import { IEventInfo } from "@/utils/parsers";



const Room = lazy(() => import("components/Room"));
const Room = lazy(() => import("@/components/Room"));
const inter = Inter({ subsets: ["latin"] });

function Title() {
Expand Down
12 changes: 4 additions & 8 deletions pages/join.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
Center,
VStack,
Input,
Box,
Textarea
} from "@chakra-ui/react";

Expand All @@ -15,15 +14,12 @@ import { faUpRightFromSquare, faEnvelope} from "@fortawesome/free-solid-svg-icon
// @ts-ignore
import { sendEmail } from "@/utils/api";
// @ts-ignore
import { checkLead } from "@/utils/api";
// @ts-ignore
import { auth } from "@/back_end/utils/index.js"

import SignInComponent from "components/SignInButton";
import { UserCredential, User, signOut, OAuthCredential} from "firebase/auth";
import { useAuth } from "context/AuthContext";
import { exchangeAuth } from "utils/api.js";
import { SpecialIconButton, SpecialSubmitButton } from "components/Parts";
import { UserCredential, signOut} from "firebase/auth";
import { useAuth } from "@/context/AuthContext";
import { exchangeAuth } from "@/utils/api.js";
import { SpecialIconButton, SpecialSubmitButton } from "@/components/Parts";
const inter = Inter({ subsets: ["latin"] });

function Title() {
Expand Down
4 changes: 2 additions & 2 deletions pages/projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import { faSearch } from "@fortawesome/free-solid-svg-icons";
import { getAllProjects } from "@/utils/api";
import { ChangeEvent, lazy, useEffect, useState } from "react";
import { IProjectInfo } from "utils/parsers";
import ProjectCard from "components/ProjectCard";
const Room = lazy(() => import("components/Room"));
import ProjectCard from "@/components/ProjectCard";
const Room = lazy(() => import("@/components/Room"));
const inter = Inter({ subsets: ["latin"] });

function Title() {
Expand Down

0 comments on commit 07cc715

Please sign in to comment.