From f75ced16cd4250a61eaf0520db400760d1a7c619 Mon Sep 17 00:00:00 2001 From: yashb196 <113057400+yashb196@users.noreply.github.com> Date: Sun, 22 Oct 2023 23:41:45 -0500 Subject: [PATCH] changing naming convention to small case --- ...onent.test.tsx => note_component.test.tsx} | 2 +- ...searchBar.test.tsx => search_bar.test.tsx} | 0 .../{noteComponent.tsx => note_component.tsx} | 0 app/lib/components/searchBar.tsx | 46 ------------------- app/page.tsx | 2 +- package.json | 1 + 6 files changed, 3 insertions(+), 48 deletions(-) rename app/__tests__/{noteComponent.test.tsx => note_component.test.tsx} (95%) rename app/__tests__/{searchBar.test.tsx => search_bar.test.tsx} (100%) rename app/lib/components/{noteComponent.tsx => note_component.tsx} (100%) delete mode 100644 app/lib/components/searchBar.tsx diff --git a/app/__tests__/noteComponent.test.tsx b/app/__tests__/note_component.test.tsx similarity index 95% rename from app/__tests__/noteComponent.test.tsx rename to app/__tests__/note_component.test.tsx index 2cdd1771..b3412230 100644 --- a/app/__tests__/noteComponent.test.tsx +++ b/app/__tests__/note_component.test.tsx @@ -1,7 +1,7 @@ import Layout from "../layout"; import "@testing-library/jest-dom"; import { fireEvent, render, screen } from "@testing-library/react"; -import NoteComponent from "../lib/components/noteComponent"; +import NoteComponent from "../lib/components/note_component"; import { RichUtils } from 'draft-js'; jest.mock('draft-js', () => ({ diff --git a/app/__tests__/searchBar.test.tsx b/app/__tests__/search_bar.test.tsx similarity index 100% rename from app/__tests__/searchBar.test.tsx rename to app/__tests__/search_bar.test.tsx diff --git a/app/lib/components/noteComponent.tsx b/app/lib/components/note_component.tsx similarity index 100% rename from app/lib/components/noteComponent.tsx rename to app/lib/components/note_component.tsx diff --git a/app/lib/components/searchBar.tsx b/app/lib/components/searchBar.tsx deleted file mode 100644 index 37a40ac0..00000000 --- a/app/lib/components/searchBar.tsx +++ /dev/null @@ -1,46 +0,0 @@ -'use client' -import React, { useState } from 'react'; -import ApiService from '../utils/ApiService'; - -const SearchBar = () => { - const [searchText, setSearchText] = typeof window !== 'undefined' ? useState('') : ['']; - - const handleSearch = async () => { - console.log("Search text:", searchText); - if (!searchText) { - console.log("Search text is empty. Aborting search."); - return; - } - try { - const response = await ApiService.searchMessages(searchText); - console.log('API Response:', response); - } catch (error) { - console.error('API Error:', error); - } - }; - - - return ( -