Skip to content

Commit

Permalink
feature: Create matching menu
Browse files Browse the repository at this point in the history
- Add basic structure of matching,
- Add all roots,
- Add carousel dependency,
- Update Mantine dependency from 7.15.1 to 7.15.2
- Create submenu for matching
- Create basic component for matching

Refs: 8696pcz16
Signed-off-by: Jimmy <[email protected]>
  • Loading branch information
JimTheCat committed Dec 26, 2024
1 parent c543d96 commit 4c039f5
Show file tree
Hide file tree
Showing 22 changed files with 406 additions and 64 deletions.
125 changes: 79 additions & 46 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 9 additions & 7 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
"test": "jest"
},
"dependencies": {
"@mantine/core": "^7.15.1",
"@mantine/dates": "^7.15.1",
"@mantine/form": "^7.15.1",
"@mantine/hooks": "^7.15.1",
"@mantine/modals": "^7.15.1",
"@mantine/notifications": "^7.15.1",
"@mantine/tiptap": "^7.15.1",
"@mantine/carousel": "^7.15.2",
"@mantine/core": "^7.15.2",
"@mantine/dates": "^7.15.2",
"@mantine/form": "^7.15.2",
"@mantine/hooks": "^7.15.2",
"@mantine/modals": "^7.15.2",
"@mantine/notifications": "^7.15.2",
"@mantine/tiptap": "^7.15.2",
"@tabler/icons-react": "^3.23.0",
"@tiptap/extension-highlight": "^2.10.0",
"@tiptap/extension-link": "^2.10.0",
Expand All @@ -31,6 +32,7 @@
"@tiptap/starter-kit": "^2.10.0",
"axios": "^1.7.9",
"dayjs": "^1.11.13",
"embla-carousel-react": "^7.1.0",
"i18next": "^23.16.1",
"jwt-decode": "^4.0.0",
"react": "^18.3.1",
Expand Down
28 changes: 28 additions & 0 deletions frontend/src/Features/Matching/Matching.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import {AppShell, Stack} from "@mantine/core";
import {Aside} from "./components/Aside";
import React from "react";
import {Main} from "./components/Main";

type MatchingProps = {
component?: React.ReactNode;
}

export const Matching = (props: MatchingProps) => {
return (
<AppShell
aside={{
breakpoint: 0,
width: 300
}}
>
<AppShell.Aside withBorder={false}>
<Aside/>
</AppShell.Aside>
<AppShell.Main p={0}>
<Stack mih={"inherit"} p={'lg'} align={'center'} justify={'center'} gap={0}>
{props.component ? props.component : <Main/>}
</Stack>
</AppShell.Main>
</AppShell>
);
}
23 changes: 23 additions & 0 deletions frontend/src/Features/Matching/components/Aside/Aside.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import {AppShell, Card, ScrollArea, Title} from "@mantine/core";
import {MenuButton} from "../../../shared/components/MenuButton";
import {IconFilterHeart, IconHeartHandshake, IconNotes, IconSettingsHeart, IconUserHeart} from "@tabler/icons-react";

export const Aside = () => {
const iconStroke = 1.5;
const base = '/matching';

return (
<Card radius={'md'} mt={"lg"} p={"sm"} w={'90%'} withBorder>
<Title order={2} mb={'xs'}>
Matching
</Title>
<AppShell.Section component={ScrollArea}>
<MenuButton icon={<IconHeartHandshake stroke={iconStroke}/>} text={'Meowknij'} href={base}/>
<MenuButton icon={<IconUserHeart stroke={iconStroke}/>} text={'Profil'} href={base + '/profile'}/>
<MenuButton icon={<IconFilterHeart stroke={iconStroke}/>} text={'Filtry'} href={base + '/filters'}/>
<MenuButton icon={<IconNotes stroke={iconStroke}/>} text={'Moje testy'} href={base + '/tests'}/>
<MenuButton icon={<IconSettingsHeart stroke={iconStroke}/>} text={'Ustawienia'} href={base + '/settings'}/>
</AppShell.Section>
</Card>
);
}
1 change: 1 addition & 0 deletions frontend/src/Features/Matching/components/Aside/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {Aside} from './Aside';
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const MatchFilters = () => {
return (
<>
</>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {MatchFilters} from './MatchFilters.tsx';
Loading

0 comments on commit 4c039f5

Please sign in to comment.