forked from Transparency/kgroad-frontend2
merge
This commit is contained in:
commit
dcac729914
@ -1,3 +1,12 @@
|
|||||||
|
## TL;DR
|
||||||
|
|
||||||
|
```
|
||||||
|
git pull
|
||||||
|
yarn install
|
||||||
|
yarn build
|
||||||
|
yarn start
|
||||||
|
```
|
||||||
|
|
||||||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
|
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
.app {
|
// .app {
|
||||||
padding-top: 78px;
|
// padding-top: 78px;
|
||||||
}
|
// }
|
||||||
|
|
||||||
@media screen and (max-width: 768px) {
|
// @media screen and (max-width: 768px) {
|
||||||
.app {
|
// .app {
|
||||||
padding-top: 72px;
|
// padding-top: 72px;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
@ -14,9 +14,7 @@ export async function generateMetadata({
|
|||||||
}: {
|
}: {
|
||||||
params: { id: string };
|
params: { id: string };
|
||||||
}): Promise<Metadata> {
|
}): Promise<Metadata> {
|
||||||
const response = await apiInstance.get<INews>(
|
const response = await apiInstance.get<INews>(`/news/${params.id}/`);
|
||||||
`/news/${params.id}/`
|
|
||||||
);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: response.data.title,
|
title: response.data.title,
|
||||||
@ -28,6 +26,9 @@ export async function generateMetadata({
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
const formatDescription = (text: string) => {
|
||||||
|
return text.replace(/(\r\n|\n|\r)/g, "<br />");
|
||||||
|
};
|
||||||
|
|
||||||
//<<<<<<< HEAD:src/app/[locale]/news/[id]/page.tsx
|
//<<<<<<< HEAD:src/app/[locale]/news/[id]/page.tsx
|
||||||
const NewsDetails = async ({
|
const NewsDetails = async ({
|
||||||
@ -40,7 +41,6 @@ const NewsDetails = async ({
|
|||||||
//>>>>>>> master:src/app/news/[id]/page.tsx
|
//>>>>>>> master:src/app/news/[id]/page.tsx
|
||||||
const getNewsById = async () => {
|
const getNewsById = async () => {
|
||||||
const response = await apiInstance.get<INews>(`/news/${params.id}/`);
|
const response = await apiInstance.get<INews>(`/news/${params.id}/`);
|
||||||
console.log(response);
|
|
||||||
return response.data;
|
return response.data;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -89,7 +89,12 @@ const NewsDetails = async ({
|
|||||||
|
|
||||||
<div className="news-details__text">
|
<div className="news-details__text">
|
||||||
<h3>{data.title}</h3>
|
<h3>{data.title}</h3>
|
||||||
<p>{data.description}</p>
|
<div
|
||||||
|
className="news-details__description"
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: formatDescription(data.description),
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ReviewSection endpoint="news" id={data.id} />
|
<ReviewSection endpoint="news" id={data.id} />
|
||||||
|
@ -2,17 +2,12 @@
|
|||||||
|
|
||||||
.navbar {
|
.navbar {
|
||||||
padding: 15px 90px;
|
padding: 15px 90px;
|
||||||
// padding: 15px;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// height: 78px;
|
|
||||||
position: fixed;
|
|
||||||
z-index: 10005;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
box-shadow: 0 4px 6px #0000001a;
|
box-shadow: 0 4px 6px #0000001a;
|
||||||
margin-bottom: 40px;
|
|
||||||
|
|
||||||
&__logo {
|
&__logo {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
Loading…
Reference in New Issue
Block a user