forked from Transparency/kgroad-frontend2
made like
This commit is contained in:
1 parent
16bb5a4a1a
commit
7a9ba30e8f
2 files changed
+45
-7
No files matched your search
@@ -19,11 +19,12 @@ const ReportDetails = async ({
|
||||
params: { id: string };
|
||||
}) => {
|
||||
const getReportDetails = async () => {
|
||||
const res = await apiInstance.get<IReport>(
|
||||
`/report/${params.id}/`
|
||||
const res = await fetch(
|
||||
`${process.env.NEXT_PUBLIC_BASE_API}/report/${params.id}/`,
|
||||
{ cache: "no-store" }
|
||||
);
|
||||
|
||||
return res.data;
|
||||
return res.json();
|
||||
};
|
||||
const report: IReport = await getReportDetails();
|
||||
|
||||
@@ -75,6 +76,7 @@ const ReportDetails = async ({
|
||||
|
||||
return images;
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="report-details page-padding">
|
||||
<div className="report-details__container">
|
||||
@@ -94,7 +96,10 @@ const ReportDetails = async ({
|
||||
, {report.created_at.slice(0, 4)}
|
||||
</p>
|
||||
</div>
|
||||
<ReportLike count={report.total_likes} />
|
||||
<ReportLike
|
||||
count={report.total_likes}
|
||||
report_id={report.id}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<p className="report-information__description">
|
||||
|
||||
Reference in new issue
Block a user