Skip to content

Commit de2997f

Browse files
authored
feat: update to latest version (#2)
1 parent 6ce9617 commit de2997f

File tree

15 files changed

+221
-132
lines changed

15 files changed

+221
-132
lines changed

apps/api-harmonization/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"@nestjs/core": "^10.0.0",
2727
"@nestjs/platform-express": "^10.0.0",
2828
"@o2s/framework": "^0.20.0",
29-
"@o2s/integrations.mocked": "^0.19.0",
29+
"@o2s/integrations.mocked": "^0.20.0",
3030
"@o2s/utils.logger": "^0.9.3",
3131
"compression": "^1.8.0",
3232
"cookie": "^1.0.2",

apps/frontend/CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
# @o2s/frontend
22

3+
## 0.18.0
4+
5+
### Minor Changes
6+
7+
- 98b2b61: implemented breadcrumbs
8+
- 77f9dc4: UI theme update
9+
10+
### Patch Changes
11+
12+
- Updated dependencies [77f9dc4]
13+
- Updated dependencies [98b2b61]
14+
- Updated dependencies [77f9dc4]
15+
- Updated dependencies [77f9dc4]
16+
- @o2s/ui@0.12.0
17+
- @o2s/api-harmonization@0.18.0
18+
19+
## 0.17.0
20+
21+
### Minor Changes
22+
23+
- 35eeac7: implement service details page
24+
- 92be116: added Price model, services page implemented
25+
- 92be116: implement services page
26+
- 35eeac7: implement service details page
27+
- 52b3e0a: add tooltips to mocked buttons
28+
29+
### Patch Changes
30+
31+
- Updated dependencies [35eeac7]
32+
- Updated dependencies [92be116]
33+
- Updated dependencies [92be116]
34+
- Updated dependencies [35eeac7]
35+
- Updated dependencies [52b3e0a]
36+
- @o2s/api-harmonization@0.17.0
37+
- @o2s/ui@0.11.0
38+
339
## 0.16.0
440

541
### Minor Changes

apps/frontend/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@o2s/frontend",
3-
"version": "0.16.0",
3+
"version": "0.18.0",
44
"private": true,
55
"scripts": {
66
"prepare": "npx prisma generate",
@@ -30,7 +30,7 @@
3030
"formik": "^2.4.6",
3131
"js-cookie": "^3.0.5",
3232
"jsonwebtoken": "^9.0.2",
33-
"markdown-to-jsx": "^7.7.3",
33+
"markdown-to-jsx": "^7.7.4",
3434
"next": "15.2.4",
3535
"next-auth": "^5.0.0-beta.25",
3636
"next-compose-plugins": "^2.2.1",
@@ -58,7 +58,7 @@
5858
"@types/react-dom": "19.0.0",
5959
"dotenv": "^16.4.7",
6060
"eslint": "^8",
61-
"eslint-config-next": "15.2.1",
61+
"eslint-config-next": "15.2.4",
6262
"postcss": "^8",
6363
"prettier": "^3.5.3",
6464
"prisma": "^6.5.0",

apps/frontend/src/app/[locale]/[[...slug]]/page.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { auth, signIn } from '@/auth';
1414

1515
import { PageTemplate } from '@/templates/PageTemplate/PageTemplate';
1616

17+
import { Breadcrumbs } from '@/components/Breadcrumbs/Breadcrumbs';
1718
import { Client } from '@/components/Client';
1819

1920
interface Props {
@@ -89,14 +90,17 @@ export default async function Page({ params }: Props) {
8990
<main className="flex flex-col gap-6 row-start-2 items-center sm:items-start">
9091
<Client page={data} />
9192

92-
{!data.hasOwnTitle && (
93-
<div className="flex flex-col gap-6 w-full">
94-
<Typography variant="h1" asChild>
95-
<h1>{meta.seo.title}</h1>
96-
</Typography>
97-
<Separator />
98-
</div>
99-
)}
93+
<div className="flex flex-col gap-6 w-full">
94+
<Breadcrumbs breadcrumbs={data.breadcrumbs} />
95+
{!data.hasOwnTitle && (
96+
<>
97+
<Typography variant="h1" asChild>
98+
<h1>{meta.seo.title}</h1>
99+
</Typography>
100+
<Separator />
101+
</>
102+
)}
103+
</div>
100104

101105
<PageTemplate slug={slug} data={data} session={session} />
102106
</main>

apps/frontend/src/blocks/PaymentsSummary/PaymentCard/PaymentCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ export const PaymentCard: React.FC<PaymentCardProps> = ({ data, variant = 'defau
4242
{variant === 'destructive' ? destructiveIconMap : defaultIconMap}
4343
</div>
4444

45-
<div className="flex justify-between items-end gap-4">
46-
<div className="flex flex-col gap-2">
45+
<div className="flex justify-between sm:items-end gap-4 sm:flex-row flex-col">
46+
<div className="flex flex-col gap-2 ">
4747
<Typography
4848
variant="highlightedBig"
4949
className={cn(activeState ? className : 'text-muted-foreground')}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import { ChevronRight } from 'lucide-react';
2+
import React from 'react';
3+
4+
import {
5+
Breadcrumb,
6+
BreadcrumbItem,
7+
BreadcrumbLink,
8+
BreadcrumbList,
9+
BreadcrumbPage,
10+
BreadcrumbSeparator,
11+
} from '@o2s/ui/components/breadcrumb';
12+
import { Link } from '@o2s/ui/components/link';
13+
14+
import { Link as NextLink } from '@/i18n';
15+
16+
import { BreadcrumbsProps } from './Breadcrumbs.types';
17+
18+
export function Breadcrumbs({ breadcrumbs }: BreadcrumbsProps) {
19+
if (!breadcrumbs?.length) return null;
20+
21+
return (
22+
<Breadcrumb>
23+
<BreadcrumbList>
24+
{breadcrumbs?.map((item, index) =>
25+
index !== breadcrumbs.length - 1 ? (
26+
<React.Fragment key={item.slug}>
27+
<BreadcrumbItem>
28+
{item.slug ? (
29+
<BreadcrumbLink asChild>
30+
<Link asChild>
31+
<NextLink
32+
href={item.slug}
33+
className="no-underline hover:no-underline !text-muted-foreground hover:!text-foreground"
34+
>
35+
{item.label}
36+
</NextLink>
37+
</Link>
38+
</BreadcrumbLink>
39+
) : (
40+
<BreadcrumbPage>{item.label}</BreadcrumbPage>
41+
)}
42+
</BreadcrumbItem>
43+
<BreadcrumbSeparator className="[&>svg]:w-4 [&>svg]:h-4">
44+
<ChevronRight className="text-muted-foreground" />
45+
</BreadcrumbSeparator>
46+
</React.Fragment>
47+
) : (
48+
<BreadcrumbItem key={item.slug}>
49+
<BreadcrumbPage>{item.label}</BreadcrumbPage>
50+
</BreadcrumbItem>
51+
),
52+
)}
53+
</BreadcrumbList>
54+
</Breadcrumb>
55+
);
56+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export interface BreadcrumbsProps {
2+
breadcrumbs?: BreadcrumbItem[];
3+
}
4+
5+
export interface BreadcrumbItem {
6+
label: string;
7+
slug?: string;
8+
}

apps/frontend/src/containers/Footer/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const Footer: React.FC<FooterProps> = ({ data }) => {
2727
const locale = useLocale();
2828

2929
const navigationItemClass = cn(
30-
'no-underline hover:no-underline w-full !justify-between h-10 p-2 !text-base !text-navbar-primary hover:!text-navbar-sub-foreground hover:!bg-navbar-sub-accent',
30+
'no-underline hover:no-underline w-full !justify-between h-10 p-2 !text-base !text-navbar-primary hover:!text-navbar-sub-muted hover:!bg-navbar-accent-background',
3131
);
3232

3333
const mobileNavigationItemClass = cn(navigationMenuTriggerStyle(), navigationItemClass);

apps/frontend/src/containers/Header/ContextSwitcher/ContextSwitcher.tsx

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
import { Building2, ChevronDown } from 'lucide-react';
2-
import { useTranslations } from 'next-intl';
32
import { useState } from 'react';
43

54
import { Alert } from '@o2s/ui/components/alert';
65
import { Button } from '@o2s/ui/components/button';
7-
import { Sheet, SheetContent, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from '@o2s/ui/components/sheet';
8-
import { TooltipContent } from '@o2s/ui/components/tooltip';
9-
import { TooltipTrigger } from '@o2s/ui/components/tooltip';
10-
import { Tooltip } from '@o2s/ui/components/tooltip';
6+
import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from '@o2s/ui/components/sheet';
117
import { Typography } from '@o2s/ui/components/typography';
128

139
import { ContextSwitcherProps } from './ContextSwitcher.types';
1410

1511
export const ContextSwitcher = ({ context }: ContextSwitcherProps) => {
16-
const t = useTranslations();
17-
const [isTooltipOpen, setIsTooltipOpen] = useState(false);
1812
const [isCompanyMenuOpen, setIsCompanyMenuOpen] = useState(false);
1913

2014
if (!context) {
@@ -51,18 +45,11 @@ export const ContextSwitcher = ({ context }: ContextSwitcherProps) => {
5145

5246
<Alert>Option to switch user organizations is coming soon!</Alert>
5347

54-
<SheetFooter>
55-
<Tooltip open={isTooltipOpen} onOpenChange={setIsTooltipOpen} defaultOpen={false}>
56-
<TooltipTrigger asChild>
57-
<Button variant="default" onClick={() => setIsTooltipOpen(true)}>
58-
{context.apply}
59-
</Button>
60-
</TooltipTrigger>
61-
<TooltipContent>
62-
<p>{t('general.comingSoon')}</p>
63-
</TooltipContent>
64-
</Tooltip>
65-
</SheetFooter>
48+
{/* <SheetFooter>
49+
<Button variant="default">
50+
{context.apply}
51+
</Button>
52+
</SheetFooter> */}
6653
</div>
6754
</SheetContent>
6855
</Sheet>

apps/frontend/src/containers/Header/DesktopNavigation/DesktopNavigation.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,7 @@ export function DesktopNavigation({
152152
{items.map((item) => {
153153
switch (item.__typename) {
154154
case 'NavigationItem':
155-
return (
156-
<NavigationItem
157-
item={item}
158-
key={item.label}
159-
active={false}
160-
className={'!text-navbar-sub-muted'}
161-
/>
162-
);
155+
return <NavigationItem item={item} key={item.label} active={false} />;
163156
case 'NavigationGroup':
164157
return (
165158
<NavigationItem
@@ -170,7 +163,6 @@ export function DesktopNavigation({
170163
}}
171164
key={item.title}
172165
active={false}
173-
className={'!text-navbar-sub-muted'}
174166
/>
175167
);
176168
}
@@ -212,7 +204,7 @@ export function DesktopNavigation({
212204
item={item}
213205
key={item.label}
214206
active={pathname === item.url}
215-
className="!text-base"
207+
className="!text-base !text-navbar-sub-foreground hover:!text-navbar-sub-foreground hover:!bg-navbar-sub-accent"
216208
/>
217209
);
218210
case 'NavigationGroup':

0 commit comments

Comments
 (0)