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).
|
||||
|
||||
## Getting Started
|
||||
|
@ -1,9 +1,9 @@
|
||||
.app {
|
||||
padding-top: 78px;
|
||||
}
|
||||
// .app {
|
||||
// padding-top: 78px;
|
||||
// }
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.app {
|
||||
padding-top: 72px;
|
||||
}
|
||||
}
|
||||
// @media screen and (max-width: 768px) {
|
||||
// .app {
|
||||
// padding-top: 72px;
|
||||
// }
|
||||
// }
|
||||
|
@ -14,9 +14,7 @@ export async function generateMetadata({
|
||||
}: {
|
||||
params: { id: string };
|
||||
}): Promise<Metadata> {
|
||||
const response = await apiInstance.get<INews>(
|
||||
`/news/${params.id}/`
|
||||
);
|
||||
const response = await apiInstance.get<INews>(`/news/${params.id}/`);
|
||||
|
||||
return {
|
||||
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
|
||||
const NewsDetails = async ({
|
||||
@ -40,7 +41,6 @@ const NewsDetails = async ({
|
||||
//>>>>>>> master:src/app/news/[id]/page.tsx
|
||||
const getNewsById = async () => {
|
||||
const response = await apiInstance.get<INews>(`/news/${params.id}/`);
|
||||
console.log(response);
|
||||
return response.data;
|
||||
};
|
||||
|
||||
@ -89,7 +89,12 @@ const NewsDetails = async ({
|
||||
|
||||
<div className="news-details__text">
|
||||
<h3>{data.title}</h3>
|
||||
<p>{data.description}</p>
|
||||
<div
|
||||
className="news-details__description"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: formatDescription(data.description),
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<ReviewSection endpoint="news" id={data.id} />
|
||||
|
@ -2,17 +2,12 @@
|
||||
|
||||
.navbar {
|
||||
padding: 15px 90px;
|
||||
// padding: 15px;
|
||||
width: 100%;
|
||||
// height: 78px;
|
||||
position: fixed;
|
||||
z-index: 10005;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 4px 6px #0000001a;
|
||||
margin-bottom: 40px;
|
||||
|
||||
&__logo {
|
||||
display: flex;
|
||||
|
Loading…
Reference in New Issue
Block a user