diff --git a/front/src/app/(home)/example/page.tsx b/front/src/app/(home)/examples/page.tsx similarity index 100% rename from front/src/app/(home)/example/page.tsx rename to front/src/app/(home)/examples/page.tsx diff --git a/front/src/modules/common/layouts/home/home.module.scss b/front/src/modules/common/layouts/home/home.module.scss index 629908f..4512f87 100644 --- a/front/src/modules/common/layouts/home/home.module.scss +++ b/front/src/modules/common/layouts/home/home.module.scss @@ -1,3 +1,6 @@ .container { + display: flex; + flex-direction: column; + min-height: 100vh; background-color: var(--color-background); } diff --git a/front/src/modules/example/components/example-list/example-list.component.tsx b/front/src/modules/example/components/example-list/example-list.component.tsx index 9a2b1c7..80a471a 100644 --- a/front/src/modules/example/components/example-list/example-list.component.tsx +++ b/front/src/modules/example/components/example-list/example-list.component.tsx @@ -1,5 +1,7 @@ import { useQuery } from "@/modules/common/hooks/api/useQuery"; import styles from "./example-list.module.scss"; +import Image from "next/image"; +import Link from "next/link"; type ExampleListProps = {}; @@ -24,11 +26,35 @@ export const ExampleList: React.FC = ({}) => { timeout: 4000, }); + if (result.isLoading) { + return <>Loading...; + } + + if (result.isError) { + return <>Error; + } + return ( -
- {JSON.stringify(result.data)} - {one.isError &&

ERROR

} -

ONE{JSON.stringify(one.data)}

+
+
    + {result.data?.map((example) => { + return ( + +
  • + picture + {example.name} + {example.description} +
  • + + ); + })} +
+
This could be the pagination...
); }; diff --git a/front/src/modules/example/components/example-list/example-list.module.scss b/front/src/modules/example/components/example-list/example-list.module.scss index 4851408..0603104 100644 --- a/front/src/modules/example/components/example-list/example-list.module.scss +++ b/front/src/modules/example/components/example-list/example-list.module.scss @@ -1,2 +1,34 @@ .container { + display: flex; + flex-direction: column; + flex: 1; + padding: 1.2rem; + gap: 1rem; + + & ul { + flex: 1; + list-style: none; + display: flex; + flex-direction: column; + gap: 10px; + padding: 0.8rem; + background-color: var(--color-grey-90); + border-radius: 0.8rem; + + & a > li { + display: grid; + grid-auto-flow: column; + grid-template-columns: 1fr 1fr 1fr; + align-items: center; + padding: 0.3rem 1.4rem; + width: 100%; + background-color: var(--color-primary-light); + box-shadow: 0 2px 4px rgba(var(--color-black-rgb), 0.2); + border-radius: 0.8rem; + + & > img { + border-radius: 50%; + } + } + } } diff --git a/front/src/modules/example/views/example-list/example-list.module.scss b/front/src/modules/example/views/example-list/example-list.module.scss index 4851408..5985ddd 100644 --- a/front/src/modules/example/views/example-list/example-list.module.scss +++ b/front/src/modules/example/views/example-list/example-list.module.scss @@ -1,2 +1,5 @@ .container { + display: flex; + flex-direction: column; + flex: 1; }