Skip to content

Commit

Permalink
Merge pull request #95 from JimTheCat/CU-8696pcz16_Create-matching-pa…
Browse files Browse the repository at this point in the history
…ge_Patryk-Kosiski

Cu 8696pcz16 create matching page patryk kosiski
  • Loading branch information
JimTheCat authored Jan 5, 2025
2 parents 0af0695 + 6613c36 commit 7102085
Show file tree
Hide file tree
Showing 35 changed files with 1,079 additions and 75 deletions.
2 changes: 2 additions & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MeowHub</title>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=%VITE_GOOGLE_PLACES_API_KEY%&libraries=places"></script>
</head>
<body>
<div id="root"></div>
Expand Down
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
7 changes: 6 additions & 1 deletion frontend/src/Features/CreatePost/CreatePost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ export const CreatePost = () => {
const contentToSave = contentRef.current;
console.log('Create post: ', contentToSave);
if (!contentToSave) {
alert.showError('Post is empty!');
alert.showError({
title: 'Error',
message: 'Content is empty',
level: 'WARNING',
timestamp: new Date().toISOString()
});
return;
}

Expand Down
26 changes: 26 additions & 0 deletions frontend/src/Features/Matching/Matching.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {AppShell} 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}>
{props.component ? props.component : <Main/>}
</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';
Loading

0 comments on commit 7102085

Please sign in to comment.