From 26810bad772c8200f76578059f3141e050e49927 Mon Sep 17 00:00:00 2001 From: Aswanth Vc Date: Mon, 4 Dec 2023 00:32:58 +0530 Subject: [PATCH] types folder changed --- src/apis/api.tsx | 2 +- src/apis/eventApi.tsx | 2 +- src/apis/userApi.tsx | 7 ++++++- src/components/buttons/LoginButton/LoginButton.tsx | 1 - src/components/eventcard/EventCard.tsx | 2 +- src/components/eventlist/EventList.tsx | 2 +- src/components/sidebar/Sidebar.tsx | 2 +- src/components/toast/Toast.tsx | 2 +- src/components/usercard/UserCard.tsx | 2 +- src/pages/dashboard/Dashboard.tsx | 2 +- src/pages/event/Event.tsx | 2 +- src/pages/login/Login.tsx | 7 ++++++- src/pages/register/Register.tsx | 2 +- src/pages/register/RegisterStep2.tsx | 7 ++++++- src/{ => utils}/types.tsx | 0 15 files changed, 28 insertions(+), 14 deletions(-) rename src/{ => utils}/types.tsx (100%) diff --git a/src/apis/api.tsx b/src/apis/api.tsx index 32ac13ff..1d8a95a0 100644 --- a/src/apis/api.tsx +++ b/src/apis/api.tsx @@ -3,7 +3,7 @@ import axios, { AxiosResponse, InternalAxiosRequestConfig, } from "axios"; -import { _EventInfo } from "../types"; +import { _EventInfo } from "../utils/types"; /* set the token */ diff --git a/src/apis/eventApi.tsx b/src/apis/eventApi.tsx index 2e0f03ad..a910e242 100644 --- a/src/apis/eventApi.tsx +++ b/src/apis/eventApi.tsx @@ -1,4 +1,4 @@ -import { _EventInfo } from "../types"; +import { _EventInfo } from "../utils/types"; import { ResponseStatus, ResponseType, diff --git a/src/apis/userApi.tsx b/src/apis/userApi.tsx index 8c709e5f..8b9b936c 100644 --- a/src/apis/userApi.tsx +++ b/src/apis/userApi.tsx @@ -1,4 +1,9 @@ -import { _UserDetails, _UserLogin, _UserStep1, _UserStep2 } from "../types"; +import { + _UserDetails, + _UserLogin, + _UserStep1, + _UserStep2, +} from "../utils/types"; import { LoginStatus, ResponseStatus, diff --git a/src/components/buttons/LoginButton/LoginButton.tsx b/src/components/buttons/LoginButton/LoginButton.tsx index 4b527f51..a6dc432c 100644 --- a/src/components/buttons/LoginButton/LoginButton.tsx +++ b/src/components/buttons/LoginButton/LoginButton.tsx @@ -1,5 +1,4 @@ import styles from "./LoginButton.module.css"; -import React, { useEffect } from "react"; import googleIcon from "../../../assets/google.png"; interface LoginButtonProps { diff --git a/src/components/eventcard/EventCard.tsx b/src/components/eventcard/EventCard.tsx index ce892e29..73394e91 100644 --- a/src/components/eventcard/EventCard.tsx +++ b/src/components/eventcard/EventCard.tsx @@ -1,6 +1,6 @@ import { Link } from "react-router-dom"; import style from "./EventCard.module.css"; -import { _Event } from "../../types"; +import { _Event } from "../../utils/types"; interface EventCardProps { event: _Event; } diff --git a/src/components/eventlist/EventList.tsx b/src/components/eventlist/EventList.tsx index 7df50dcc..e45258ed 100644 --- a/src/components/eventlist/EventList.tsx +++ b/src/components/eventlist/EventList.tsx @@ -2,7 +2,7 @@ import style from "./EventList.module.css"; import { useEffect, useState } from "react"; import EventCard from "../eventcard/EventCard"; import { getEvents } from "../../apis/eventApi"; -import { _Event } from "../../types"; +import { _Event } from "../../utils/types"; import { useLoader } from "../toploader/useLoader"; import { useToast } from "../toast/useToast"; interface EventListProps {} diff --git a/src/components/sidebar/Sidebar.tsx b/src/components/sidebar/Sidebar.tsx index 4b4ce07e..6394ece1 100644 --- a/src/components/sidebar/Sidebar.tsx +++ b/src/components/sidebar/Sidebar.tsx @@ -1,5 +1,5 @@ import style from "./Sidebar.module.css"; -import { _Event } from "../../types"; +import { _Event } from "../../utils/types"; interface SidebarProps { state: boolean; diff --git a/src/components/toast/Toast.tsx b/src/components/toast/Toast.tsx index e54a2d0a..34205d80 100644 --- a/src/components/toast/Toast.tsx +++ b/src/components/toast/Toast.tsx @@ -1,5 +1,5 @@ import style from "./Toast.module.css"; -import { _Event } from "../../types"; +import { _Event } from "../../utils/types"; import { useEffect } from "react"; import { useToast } from "./useToast"; interface ToastProps {} diff --git a/src/components/usercard/UserCard.tsx b/src/components/usercard/UserCard.tsx index f17b1376..924628ef 100644 --- a/src/components/usercard/UserCard.tsx +++ b/src/components/usercard/UserCard.tsx @@ -1,5 +1,5 @@ import style from "./UserCard.module.css"; -import { _Event, _UserDetails } from "../../types"; +import { _Event, _UserDetails } from "../../utils/types"; import defaultProfile from "../../assets/frlIf.png"; interface UserCardProps { diff --git a/src/pages/dashboard/Dashboard.tsx b/src/pages/dashboard/Dashboard.tsx index af0079c5..3099aa15 100644 --- a/src/pages/dashboard/Dashboard.tsx +++ b/src/pages/dashboard/Dashboard.tsx @@ -5,7 +5,7 @@ import { userDetails } from "../../apis/userApi"; import { useLoader } from "../../components/toploader/useLoader"; import { useToast } from "../../components/toast/useToast"; import { useNavigate } from "react-router-dom"; -import { _UserDetails } from "../../types"; +import { _UserDetails } from "../../utils/types"; import UserCard from "../../components/usercard/UserCard"; import EventList from "../../components/eventlist/EventList"; import { myEvents } from "../../apis/eventApi"; diff --git a/src/pages/event/Event.tsx b/src/pages/event/Event.tsx index 9bf7cc38..dc9699ca 100644 --- a/src/pages/event/Event.tsx +++ b/src/pages/event/Event.tsx @@ -2,7 +2,7 @@ import style from "./Event.module.css"; // import SecondaryButton from '../../components/buttons/secondary_button/SecondaryButton'; import Footer from "../../components/footer/Footer"; import { useEffect, useState } from "react"; -import { _EventInfo } from "../../types"; +import { _EventInfo } from "../../utils/types"; import { getEvents } from "../../apis/eventApi"; import { useParams } from "react-router-dom"; import { useLoader } from "../../components/toploader/useLoader"; diff --git a/src/pages/login/Login.tsx b/src/pages/login/Login.tsx index d638ab57..d1f4d38e 100644 --- a/src/pages/login/Login.tsx +++ b/src/pages/login/Login.tsx @@ -3,7 +3,12 @@ import style from "./Login.module.css"; import { Link, useNavigate } from "react-router-dom"; // import logo from "../../assets/Logo KBM.png"; import alien from "../../assets/dehill-spacelove-1-dribble.gif"; -import { _EventInfo, _UserDetails, _UserLogin, _UserStep1 } from "../../types"; +import { + _EventInfo, + _UserDetails, + _UserLogin, + _UserStep1, +} from "../../utils/types"; import { loginEmail } from "../../apis/userApi"; import { useLoader } from "../../components/toploader/useLoader"; import { useToast } from "../../components/toast/useToast"; diff --git a/src/pages/register/Register.tsx b/src/pages/register/Register.tsx index 31870731..58753858 100644 --- a/src/pages/register/Register.tsx +++ b/src/pages/register/Register.tsx @@ -3,7 +3,7 @@ import style from "./Register.module.css"; import { Link, useNavigate } from "react-router-dom"; // import logo from "../../assets/Logo KBM.png"; import alien from "../../assets/dehill-spacelove-1-dribble.gif"; -import { _EventInfo, _UserDetails, _UserStep1 } from "../../types"; +import { _EventInfo, _UserDetails, _UserStep1 } from "../../utils/types"; import { createAccount } from "../../apis/userApi"; import { useLoader } from "../../components/toploader/useLoader"; import { useToast } from "../../components/toast/useToast"; diff --git a/src/pages/register/RegisterStep2.tsx b/src/pages/register/RegisterStep2.tsx index 3b9abcd3..1878dc78 100644 --- a/src/pages/register/RegisterStep2.tsx +++ b/src/pages/register/RegisterStep2.tsx @@ -3,7 +3,12 @@ import style from "./Register.module.css"; import { Link, useNavigate } from "react-router-dom"; // import logo from "../../assets/Logo KBM.png"; import alien from "../../assets/dehill-spacelove-1-dribble.gif"; -import { _EventInfo, _UserDetails, _UserStep1, _UserStep2 } from "../../types"; +import { + _EventInfo, + _UserDetails, + _UserStep1, + _UserStep2, +} from "../../utils/types"; import { useLoader } from "../../components/toploader/useLoader"; import { useToast } from "../../components/toast/useToast"; import { completeRegistration } from "../../apis/userApi"; diff --git a/src/types.tsx b/src/utils/types.tsx similarity index 100% rename from src/types.tsx rename to src/utils/types.tsx