diff --git a/src/components/icons/BellIcon.tsx b/src/components/icons/BellIcon.tsx new file mode 100644 index 0000000..f20930d --- /dev/null +++ b/src/components/icons/BellIcon.tsx @@ -0,0 +1,12 @@ + +import React from 'react'; +import IconProps from '../interface/IconProps'; +import { BasicIcon } from './BasicIcon'; + +export const BellIcon: React.FC = ({ fill, stroke, size }) => ( + + + +); + +export default BellIcon; \ No newline at end of file diff --git a/src/components/icons/PlusIcon.tsx b/src/components/icons/PlusIcon.tsx new file mode 100644 index 0000000..e5b8d4f --- /dev/null +++ b/src/components/icons/PlusIcon.tsx @@ -0,0 +1,11 @@ +import React from 'react'; +import IconProps from '../interface/IconProps'; +import { BasicIcon } from './BasicIcon'; + +export const PlusIcon: React.FC = ({ fill, stroke, size }) => ( + + + +); + +export default PlusIcon; \ No newline at end of file diff --git a/src/components/index.ts b/src/components/index.ts index 2ae526f..44eef03 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -5,8 +5,10 @@ export { Image } from './Common/Image'; export { VStack } from './Common/VStack'; export { Header } from './Header'; // Icons +export { BellIcon } from './icons/BellIcon'; export { CalendarIcon } from './icons/CalendarIcon'; export { LogoutIcon } from './icons/LogoutIcon'; +export { PlusIcon } from './icons/PlusIcon'; export { SidebarArrowDownIcon } from './icons/SidebarArrowDownIcon'; export { SidebarArrowRightIcon } from './icons/SidebarArrowRightIcon'; diff --git a/src/routes/events/index.tsx b/src/routes/events/index.tsx index 3f70e4a..6909804 100644 --- a/src/routes/events/index.tsx +++ b/src/routes/events/index.tsx @@ -1,5 +1,5 @@ import { createFileRoute, Link } from '@tanstack/react-router'; -import { Header } from '../../components'; +import { BellIcon, Header, PlusIcon } from '../../components'; import { AuthGuard } from '../../utils/auth'; import { supabase } from '../../utils/supabase'; @@ -9,7 +9,6 @@ const styles = { backgroundColor: '#333333', }, }; - export const Route = createFileRoute('/events/')({ beforeLoad: AuthGuard, loader: async () => { @@ -28,16 +27,42 @@ export const Route = createFileRoute('/events/')({ function EventIndex() { const { events } = Route.useLoaderData() + const navigate = Route.useNavigate(); return ( <> -
-
-

活動列表

- { - events.map((event) => ( - {event.name} - )) - } +
+
+
+

活動列表

+ { + events.map((event) => ( + {event.name} + )) + } +
+ +
+ {/* This button will close the dialog */} + +
+
+
+ + )