From 52e23b7f851998a432b95441767c733b2dba133d Mon Sep 17 00:00:00 2001 From: Meliora Ho Date: Sat, 23 Mar 2024 15:54:52 +0000 Subject: [PATCH] Format code better --- compass/app/auth/layout.tsx | 16 ++-- compass/app/resource/layout.tsx | 6 +- compass/app/resource/page.tsx | 2 +- compass/components/resource/Card.tsx | 2 +- .../components/resource/LandingSearchBar.tsx | 74 +++++++++---------- compass/components/resource/Sidebar.tsx | 30 ++++---- compass/components/resource/SidebarItem.tsx | 22 +++--- 7 files changed, 76 insertions(+), 76 deletions(-) diff --git a/compass/app/auth/layout.tsx b/compass/app/auth/layout.tsx index 4757eb7..1181fe6 100644 --- a/compass/app/auth/layout.tsx +++ b/compass/app/auth/layout.tsx @@ -1,6 +1,6 @@ import Paper from '@/components/auth/Paper'; - + export default function RootLayout({ // Layouts must accept a children prop. @@ -11,12 +11,12 @@ export default function RootLayout({ }) { return ( -
- {children} -
-

- © 2024 Compass Center -

-
+
+ {children} +
+

+ © 2024 Compass Center +

+ ) } \ No newline at end of file diff --git a/compass/app/resource/layout.tsx b/compass/app/resource/layout.tsx index db968f1..9cb94c9 100644 --- a/compass/app/resource/layout.tsx +++ b/compass/app/resource/layout.tsx @@ -2,7 +2,7 @@ import Sidebar from '@/components/resource/Sidebar'; import React, { useState } from 'react'; -import {ChevronDoubleRightIcon} from '@heroicons/react/24/outline'; +import { ChevronDoubleRightIcon } from '@heroicons/react/24/outline'; export default function RootLayout({ @@ -19,11 +19,11 @@ export default function RootLayout({ className={`fixed z-20 p-2 text-gray-500 hover:text-gray-800 left-0`} aria-label={'Open sidebar'} > - {!isSidebarOpen && + {!isSidebarOpen && // Icon for closing the sidebar } - +
diff --git a/compass/app/resource/page.tsx b/compass/app/resource/page.tsx index cb9c5e9..4cd052a 100644 --- a/compass/app/resource/page.tsx +++ b/compass/app/resource/page.tsx @@ -20,7 +20,7 @@ export default function Page() {

Compass Center Advocate Landing Page

- Welcome! Below you will find a list of resources for the Compass Center's trained advocates. These materials serve to virtually provide a collection of advocacy, resource, and hotline manuals and information. + Welcome! Below you will find a list of resources for the Compass Center's trained advocates. These materials serve to virtually provide a collection of advocacy, resource, and hotline manuals and information. If you are an advocate looking for the contact information of a particular Compass Center employee, please directly contact your staff back-up or the person in charge of your training. diff --git a/compass/components/resource/Card.tsx b/compass/components/resource/Card.tsx index d02152f..61cee1d 100644 --- a/compass/components/resource/Card.tsx +++ b/compass/components/resource/Card.tsx @@ -1,4 +1,4 @@ -import React, {ReactNode} from "react"; +import React, { ReactNode } from "react"; interface TagProps { diff --git a/compass/components/resource/LandingSearchBar.tsx b/compass/components/resource/LandingSearchBar.tsx index c06d848..9b6f35c 100644 --- a/compass/components/resource/LandingSearchBar.tsx +++ b/compass/components/resource/LandingSearchBar.tsx @@ -3,43 +3,43 @@ import React, { useState } from 'react'; import Image from 'next/image'; export const LandingSearchBar: React.FC = () => { - const [searchTerm, setSearchTerm] = useState(''); - - const handleSearchChange = (event: React.ChangeEvent) => { - setSearchTerm(event.target.value); - }; - - const clearSearch = () => { - setSearchTerm(''); - }; - - return ( -
-
-
- -
- {searchTerm && ( - - )} -
-
+ const [searchTerm, setSearchTerm] = useState(''); + + const handleSearchChange = (event: React.ChangeEvent) => { + setSearchTerm(event.target.value); + }; + + const clearSearch = () => { + setSearchTerm(''); + }; + + return ( +
+
+
+
-
- Landing illustration -

Need to find something? Use the links above or the search bar to get your results.

+ {searchTerm && ( + + )} +
+
- ); - }; +
+ Landing illustration +

Need to find something? Use the links above or the search bar to get your results.

+
+
+ ); +}; diff --git a/compass/components/resource/Sidebar.tsx b/compass/components/resource/Sidebar.tsx index d50388b..ed2f726 100644 --- a/compass/components/resource/Sidebar.tsx +++ b/compass/components/resource/Sidebar.tsx @@ -6,37 +6,37 @@ interface SidebarProps { setIsSidebarOpen: React.Dispatch>; } -const Sidebar: React.FC = ({setIsSidebarOpen}) => { +const Sidebar: React.FC = ({ setIsSidebarOpen }) => { return (
- +
- +
- Compass Center - cssgunc@gmail.com + Compass Center + cssgunc@gmail.com
-

Pages

- +

Pages

+
diff --git a/compass/components/resource/SidebarItem.tsx b/compass/components/resource/SidebarItem.tsx index 342a74b..52220c5 100644 --- a/compass/components/resource/SidebarItem.tsx +++ b/compass/components/resource/SidebarItem.tsx @@ -1,14 +1,14 @@ interface SidebarItemProps { - icon: React.ReactElement; - text: string; - } - + icon: React.ReactElement; + text: string; +} + export const SidebarItem: React.FC = ({ icon, text }) => { - return ( - - {icon} - {text} - - ); - }; \ No newline at end of file + return ( + + {icon} + {text} + + ); +}; \ No newline at end of file