Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bugs #13

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
NEXT_PUBLIC_OP_MAINNET_URL=optimism.superproof.wtf
NEXT_PUBLIC_OP_SEPOLIA_URL=optimism-sepolia.superproof.wtf
NEXT_PUBLIC_BASE_SEPOLIA_URL=base-sepolia.superproof.wtf
NEXT_PUBLIC_API_DOC=/docs/swagger/index.html
NEXT_PUBLIC_API_DOC=/docs/swagger/index.html
NEXT_PUBLIC_API_URL=http://65.109.69.98:9001
NEXT_PUBLIC_SEARCH_URL=http://65.109.69.98:7700
6 changes: 3 additions & 3 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const nextConfig = {
return [
{
source: "/index/:path*",
destination: "http://65.109.69.98:7701/:path*", // Proxy to Backend, token required
destination: `${process.env.NEXT_PUBLIC_SEARCH_URL}/:path*`, // Proxy to Backend, token required
},
// {
// source: "/indexMain/:path*",
Expand All @@ -18,11 +18,11 @@ const nextConfig = {
// },
{
source: "/api/:path*",
destination: "http://65.109.69.98:9002/:path*", // Proxy to Backend
destination: `${process.env.NEXT_PUBLIC_API_URL}/:path*`, // Proxy to Backend
},
{
source: "/docs/:path*",
destination: "http://65.109.69.98:9002/:path*", // Proxy to Backend, token required
destination: `${process.env.NEXT_PUBLIC_API_URL}/:path*`, // Proxy to Backend, token required
},
// {
// source: "/apiMain/:path*",
Expand Down
25 changes: 12 additions & 13 deletions src/components/Charts/ClaimChart/ChartBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type ChartBaseProps = {
options: EChartOption;
compact?: boolean;
depth?: number;
handleClick: (e: any) => void
handleClick: (e: any) => void;
};

const COMMON_OPTIONS: EChartOption = {
Expand All @@ -24,7 +24,7 @@ export const ChartBase: FC<ChartBaseProps> = function ({
options,
compact = false,
depth = 0,
handleClick
handleClick,
}) {
const processedSeries = useMemo(
() =>
Expand All @@ -42,14 +42,13 @@ export const ChartBase: FC<ChartBaseProps> = function ({

// const len = options?.series ? options?.series[0]?.data?.length || 0 : 0;
const height = depth * 200;
const width = depth * 100;

return (
<EChartsReact
onEvents={
{
"click": handleClick
}
}
onEvents={{
click: handleClick,
}}
option={{
...COMMON_OPTIONS,
...options,
Expand All @@ -66,11 +65,11 @@ export const ChartBase: FC<ChartBaseProps> = function ({
...(options.xAxis || {}),
...(compact
? {
axisLine: { show: false },
axisLabel: {
interval: 4,
},
}
axisLine: { show: false },
axisLabel: {
interval: 4,
},
}
: {}),
},
yAxis: {
Expand All @@ -80,7 +79,7 @@ export const ChartBase: FC<ChartBaseProps> = function ({
},
series: processedSeries,
}}
style={{ height: `${height}px`, width: "100%" }}
style={{ height: `${height}px`, width: `${width}px`, minWidth: "100%" }}
/>
);
};
12 changes: 6 additions & 6 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ const App = ({ Component, pageProps }: NextAppProps) => {
gtag('config', 'G-3NB8M7WDPX');
`}
</Script>
<AppLayout>
<WalletProvider>
<NetworkConfigProvider>
<NetworkConfigProvider>
<AppLayout>
<WalletProvider>
<Component {...pageProps} />
</NetworkConfigProvider>
</WalletProvider>
</AppLayout>
</WalletProvider>
</AppLayout>
</NetworkConfigProvider>
{/* <FeedbackWidget />
{env.NEXT_PUBLIC_VERCEL_ANALYTICS_ENABLED && <Analytics />} */}
</SkeletonTheme>
Expand Down
23 changes: 15 additions & 8 deletions src/pages/game/[game].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,21 @@ const GameDetail = () => {
) : (
<SlidableList
maxItems={data?.data.length}
items={(data as ListResponse<ClaimData>).data?.map((g) => ({
id: g.id,
element: (
<div className="sm:h-28" key={g.id}>
<ClaimCard claimData={g} />
</div>
),
}))}
items={(data as ListResponse<ClaimData>).data?.map(
(g, index, arr) => {
if (index > 30) {
g.output_block = arr[30].output_block;
}
return {
id: g.id,
element: (
<div className="sm:h-28" key={g.id}>
<ClaimCard claimData={g} />
</div>
),
};
}
)}
/>
)}
</Card>
Expand Down