Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

Commit 792e29e

Browse files
committed
feat: Add mobile nav for faq
1 parent d1e6a19 commit 792e29e

File tree

21 files changed

+335
-215
lines changed

21 files changed

+335
-215
lines changed

app/[locale]/(main)/products/[id]/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { getTranslator } from 'next-intl/server';
22
import { notFound } from 'next/navigation';
33

44
import { ProductView } from '@/views/products/[id]/ProductView';
5-
import { products } from '@/views/products/configProducts';
5+
import { dataProducts } from '@/views/products/dataProducts';
66

77
interface Props {
88
params: {
@@ -14,7 +14,7 @@ interface Props {
1414
export async function generateMetadata({ params: { id, locale } }: Props) {
1515
const t = await getTranslator(locale, 'nav');
1616

17-
const findProduct = products.find(product => product.id === id);
17+
const findProduct = dataProducts.find(product => product.id === id);
1818

1919
if (findProduct) {
2020
return {
@@ -28,7 +28,7 @@ export async function generateMetadata({ params: { id, locale } }: Props) {
2828
}
2929

3030
export default function Page({ params: { id } }: Props) {
31-
const findProduct = products.find(product => product.id === id);
31+
const findProduct = dataProducts.find(product => product.id === id);
3232

3333
if (!findProduct) {
3434
notFound();

messages/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
},
137137
"faq": {
138138
"collaboration": "Collaboration",
139+
"menu": "Menu",
139140
"pages": {
140141
"welcome": "Welcome",
141142
"technology": "Technology & Tools",

messages/pl.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
},
137137
"faq": {
138138
"collaboration": "Współpraca",
139+
"menu": "Menu",
139140
"pages": {
140141
"welcome": "Witaj",
141142
"technology": "Technologie i narzędzia",

package-lock.json

Lines changed: 195 additions & 189 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"date-fns": "^2.30.0",
2222
"framer-motion": "^10.16.0",
2323
"hotkeys-js": "^3.12.0",
24-
"next": "^13.4.17",
24+
"next": "^13.4.18",
2525
"next-intl": "^3.0.0-beta.9",
2626
"react": "18.2.0",
2727
"react-dom": "18.2.0",
@@ -38,11 +38,11 @@
3838
"@fluentui/react-icons": "^2.0.211",
3939
"@mdx-js/loader": "^2.3.0",
4040
"@mdx-js/react": "^2.3.0",
41-
"@next/bundle-analyzer": "^13.4.17",
42-
"@next/mdx": "^13.4.17",
41+
"@next/bundle-analyzer": "^13.4.18",
42+
"@next/mdx": "^13.4.18",
4343
"@testing-library/react": "^14.0.0",
4444
"@types/mdx": "^2.0.6",
45-
"@types/node": "^20.5.0",
45+
"@types/node": "^20.5.1",
4646
"@types/react": "^18.2.20",
4747
"@types/react-dom": "^18.2.7",
4848
"@typescript-eslint/eslint-plugin": "^5.62.0",
@@ -53,7 +53,7 @@
5353
"@vitest/ui": "^0.34.2",
5454
"cross-env": "^7.0.3",
5555
"eslint": "^8.47.0",
56-
"eslint-config-next": "^13.4.17",
56+
"eslint-config-next": "^13.4.18",
5757
"eslint-config-prettier": "^9.0.0",
5858
"eslint-plugin-prettier": "^5.0.0",
5959
"eslint-plugin-sort-destructure-keys": "^1.5.0",
@@ -62,8 +62,8 @@
6262
"husky": "^8.0.3",
6363
"jsdom": "^22.1.0",
6464
"prettier": "^3.0.2",
65-
"sass": "^1.65.1",
66-
"stylelint": "^15.10.2",
65+
"sass": "^1.66.0",
66+
"stylelint": "^15.10.3",
6767
"stylelint-config-clean-order": "^5.2.0",
6868
"stylelint-config-standard": "^34.0.0",
6969
"stylelint-config-standard-scss": "^10.0.0",

views/faq/wrapper/WrapperFaq.module.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
@use '@/styles/media' as *;
2+
13
.wrapper {
4+
@include mobile-tablet {
5+
flex-direction: column;
6+
}
7+
28
position: relative;
39
display: flex;
410
gap: 2rem;

views/faq/wrapper/WrapperFaq.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import cx from 'clsx';
33

44
import { NavFaq } from './list/NavFaq';
55
import style from './WrapperFaq.module.scss';
6+
import { MobileNavFaq } from './list/mobile/MobileNavFaq';
67

78
interface Props {
89
children: ReactNode;
@@ -11,6 +12,7 @@ interface Props {
1112
export const WrapperFaq = ({ children }: Props) => (
1213
<main className={cx('layout_wrapper', style.wrapper)}>
1314
<NavFaq />
15+
<MobileNavFaq />
1416
<main className={style.main}>{children}</main>
1517
</main>
1618
);

views/faq/wrapper/list/NavFaq.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
}
77

88
position: sticky;
9-
top: var(--header-height);
9+
top: calc(var(--header-height) + 2rem);
1010

1111
overflow: hidden;
1212

views/faq/wrapper/list/item/ItemNavFaq.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
align-items: center;
55
justify-content: space-between;
66

7-
margin: 0.25rem 0;
7+
padding: 0.25rem 0;
88

99
color: rgb(var(--text-secondary-color));
1010

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
@use '@/styles/media' as *;
2+
3+
.main {
4+
@include desktop {
5+
display: none;
6+
}
7+
8+
padding: 1rem;
9+
}
10+
11+
.button {
12+
cursor: pointer;
13+
14+
width: 100%;
15+
height: 2.5rem;
16+
padding: 0.5rem 1.5rem;
17+
18+
font-family: inherit;
19+
font-weight: 500;
20+
color: rgb(var(--button-secondary-color));
21+
text-align: center;
22+
23+
background-color: rgb(var(--button-secondary));
24+
border: 1px solid rgb(var(--button-secondary-border));
25+
border-radius: var(--radius);
26+
27+
transition:
28+
background-color var(--animation),
29+
border-color var(--animation),
30+
color var(--animation);
31+
32+
&:hover {
33+
color: rgb(var(--button-secondary-hover-color));
34+
}
35+
36+
&:focus,
37+
&:active {
38+
outline: none;
39+
}
40+
}
41+
42+
.list {
43+
padding-top: 1rem;
44+
list-style: none;
45+
46+
ul {
47+
list-style: none;
48+
}
49+
}

0 commit comments

Comments
 (0)