style: relayouting result section to responsive approach
This commit is contained in:
parent
e30e126e0d
commit
7a2f2be054
|
|
@ -15,7 +15,7 @@ const RadarComparisonChart = ({ data }: RadarProps) => {
|
|||
const { chartData, colors } = radarFormat({ data });
|
||||
|
||||
return (
|
||||
<div className="w-1/2 h-100 bg-card p-5 rounded-xl border items-center flex flex-col">
|
||||
<div className="h-100 bg-card p-5 rounded-xl border items-center flex flex-col">
|
||||
<h3 className="text-lg font-semibold text-center">
|
||||
Perbandingan Aspek Produk
|
||||
</h3>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export default function ResultDetails({ result }: ResultProps) {
|
|||
if (!result || !result.details || result.details.length === 0) return null;
|
||||
|
||||
return (
|
||||
<div className="space-y-6 w-1/2">
|
||||
<div className="space-y-6">
|
||||
<div className="relative group border p-8 rounded-xl bg-card h-100 overflow-hidden">
|
||||
{activeProductIndex > 0 && (
|
||||
<button
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export default function Resultection({ result }: ResultProps) {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex gap-4">
|
||||
<div className="grid grid-cols-1 md:grid-cols-1 lg:grid-cols-2 gap-4">
|
||||
<RadarComparisonChart data={result.details} />
|
||||
<ResultDetails result={result} />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ export async function scrapeTokopediaProduct(
|
|||
let browser;
|
||||
|
||||
try {
|
||||
const isLocal = process.env.NODE_ENV === "development";
|
||||
browser = await puppeteer.launch({
|
||||
args: [
|
||||
...chromium.args,
|
||||
|
|
@ -38,7 +39,9 @@ export async function scrapeTokopediaProduct(
|
|||
"--disable-setuid-sandbox",
|
||||
"--disable-blink-features=AutomationControlled",
|
||||
],
|
||||
executablePath: await chromium.executablePath(chromiumUrl),
|
||||
executablePath: isLocal
|
||||
? "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"
|
||||
: await chromium.executablePath(chromiumUrl),
|
||||
headless: true,
|
||||
defaultViewport: { width: 1280, height: 800 },
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue