Skip to content

Commit 991cdb9

Browse files
committed
Patch over newest
1 parent 454c80d commit 991cdb9

28 files changed

+23176
-3860
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
1-
<h1 align="center">Lux Explore</h1>
1+
<h1 align="center">Blockscout frontend</h1>
22

33
<p align="center">
44
<span>Frontend application for </span>
5-
<a href="https://github.com/luxfi/explore/blob/master/README.md">Lux Explorer</a>
5+
<a href="https://github.com/blockscout/blockscout/blob/master/README.md">Blockscout</a>
66
<span> blockchain explorer</span>
77
</p>
88

99
## Running and configuring the app
1010

11-
App is distributed as a docker image. Here you can find information about the [package](https://github.com/luxfi/explore/pkgs/container/frontend) and its recent [releases](https://github.com/luxfi/explore/releases).
11+
App is distributed as a docker image. Here you can find information about the [package](https://github.com/blockscout/frontend/pkgs/container/frontend) and its recent [releases](https://github.com/blockscout/frontend/releases).
1212

1313
You can configure your app by passing necessary environment variables when starting the container. See full list of ENVs and their description [here](./docs/ENVS.md).
1414

1515
```sh
16-
docker run -p 3000:3000 --env-file <path-to-your-env-file> ghcr.io/luxfi/explore:latest
16+
docker run -p 3000:3000 --env-file <path-to-your-env-file> ghcr.io/blockscout/frontend:latest
1717
```
1818

1919
Alternatively, you can build your own docker image and run your app from that. Please follow this [guide](./docs/CUSTOM_BUILD.md).
2020

21-
<<<<<<< HEAD
22-
=======
21+
For more information on migrating from the previous frontend, please see the [frontend migration docs](https://docs.blockscout.com/for-developers/frontend-migration).
2322

24-
>>>>>>> c463e20f1 (Update luxfi links)
2523
## Contributing
2624

2725
See our [Contribution guide](./docs/CONTRIBUTING.md) for pull request protocol. We expect contributors to follow our [code of conduct](./CODE_OF_CONDUCT.md) when submitting code or comments.
@@ -30,6 +28,8 @@ See our [Contribution guide](./docs/CONTRIBUTING.md) for pull request protocol.
3028
- [App ENVs list](./docs/ENVS.md)
3129
- [Contribution guide](./docs/CONTRIBUTING.md)
3230
- [Making a custom build](./docs/CUSTOM_BUILD.md)
31+
- [Frontend migration guide](https://docs.blockscout.com/for-developers/frontend-migration)
32+
- [Manual deployment guide with backend and microservices](https://docs.blockscout.com/for-developers/deployment/manual-deployment-guide)
3333

3434
## License
3535

lib/hooks/useIssueUrl.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function useIssueUrl(backendVersion: string | undefined) {
2424
'frontend-version': [ config.UI.footer.frontendVersion, config.UI.footer.frontendCommit ].filter(Boolean).join('+'),
2525
'additional-information': `**User Agent:** ${ window.navigator.userAgent }`,
2626
});
27-
return `https://github.com/luxfi/explore/issues/new/?${ searchParams.toString() }`;
27+
return `https://github.com/blockscout/blockscout/issues/new/?${ searchParams.toString() }`;
2828
// we need to update link whenever page url changes
2929
// eslint-disable-next-line react-hooks/exhaustive-deps
3030
}, [ backendVersion, isLoading, router.asPath ]);

nextjs/csp/generateCspPolicy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function generateCspPolicy() {
88
descriptors.cloudFlare(),
99
descriptors.gasHawk(),
1010
descriptors.googleAnalytics(),
11-
//descriptors.googleFonts(),
11+
descriptors.googleFonts(),
1212
descriptors.googleReCaptcha(),
1313
descriptors.growthBook(),
1414
descriptors.helia(),

nextjs/nextjs-routes.d.ts

+5-35
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55

66
// prettier-ignore
77
declare module "nextjs-routes" {
8-
import type {
9-
GetServerSidePropsContext as NextGetServerSidePropsContext,
10-
GetServerSidePropsResult as NextGetServerSidePropsResult
11-
} from "nextjs";
12-
138
export type Route =
149
| StaticRoute<"/404">
1510
| StaticRoute<"/account/api-key">
@@ -105,33 +100,6 @@ declare module "nextjs-routes" {
105100
* route({ pathname: "/foos/[foo]", query: { foo: "bar" }}) will produce "/foos/bar".
106101
*/
107102
export declare function route(r: Route): string;
108-
109-
/**
110-
* Nearly identical to GetServerSidePropsContext from next, but further narrows
111-
* types based on nextjs-route's route data.
112-
*/
113-
export type GetServerSidePropsContext<
114-
Pathname extends Route["pathname"] = Route["pathname"],
115-
Preview extends NextGetServerSidePropsContext["previewData"] = NextGetServerSidePropsContext["previewData"]
116-
> = Omit<NextGetServerSidePropsContext, 'params' | 'query' | 'defaultLocale' | 'locale' | 'locales'> & {
117-
params: Extract<Route, { pathname: Pathname }>["query"];
118-
query: Query;
119-
defaultLocale?: undefined;
120-
locale?: Locale;
121-
locales?: undefined;
122-
};
123-
124-
/**
125-
* Nearly identical to GetServerSideProps from next, but further narrows
126-
* types based on nextjs-route's route data.
127-
*/
128-
export type GetServerSideProps<
129-
Props extends { [key: string]: any } = { [key: string]: any },
130-
Pathname extends Route["pathname"] = Route["pathname"],
131-
Preview extends NextGetServerSideProps["previewData"] = NextGetServerSideProps["previewData"]
132-
> = (
133-
context: GetServerSidePropsContext<Pathname, Preview>
134-
) => Promise<NextGetServerSidePropsResult<Props>>
135103
}
136104

137105
// prettier-ignore
@@ -146,12 +114,13 @@ declare module "next/link" {
146114
} from "react";
147115
export * from "next/dist/client/link";
148116

117+
type Query = { query?: { [key: string]: string | string[] | undefined } };
149118
type StaticRoute = Exclude<Route, { query: any }>["pathname"];
150119

151120
export interface LinkProps
152121
extends Omit<NextLinkProps, "href" | "locale">,
153122
AnchorHTMLAttributes<HTMLAnchorElement> {
154-
href: Route | StaticRoute | Omit<Route, "pathname">
123+
href: Route | StaticRoute | Query;
155124
locale?: false;
156125
}
157126

@@ -179,6 +148,7 @@ declare module "next/router" {
179148

180149
type NextTransitionOptions = NonNullable<Parameters<Router["push"]>[2]>;
181150
type StaticRoute = Exclude<Route, { query: any }>["pathname"];
151+
type Query = { query?: { [key: string]: string | string[] | undefined } };
182152

183153
interface TransitionOptions extends Omit<NextTransitionOptions, "locale"> {
184154
locale?: false;
@@ -200,12 +170,12 @@ declare module "next/router" {
200170
locale?: Locale;
201171
locales?: undefined;
202172
push(
203-
url: Route | StaticRoute | Omit<Route, "pathname">,
173+
url: Route | StaticRoute | Query,
204174
as?: string,
205175
options?: TransitionOptions
206176
): Promise<boolean>;
207177
replace(
208-
url: Route | StaticRoute | Omit<Route, "pathname">,
178+
url: Route | StaticRoute | Query,
209179
as?: string,
210180
options?: TransitionOptions
211181
): Promise<boolean>;

package.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@luxfi/explore",
33
"version": "1.0.0",
44
"private": false,
5-
"homepage": "https://github.com/luxfi/explore#readme",
5+
"homepage": "https://github.com/blockscout/frontend#readme",
66
"engines": {
77
"node": "22.11.0",
88
"npm": "10.9.0"
@@ -45,8 +45,6 @@
4545
"@chakra-ui/anatomy": "^2.2.2",
4646
"@chakra-ui/lazy-utils": "2.0.5",
4747
"@chakra-ui/react": "2.7.1",
48-
"@chakra-ui/styled-system": "^2.9.2",
49-
"@chakra-ui/system": "^2.6.2",
5048
"@chakra-ui/theme-tools": "^2.0.18",
5149
"@cloudnouns/kit": "1.1.6",
5250
"@emotion/react": "^11.10.4",
@@ -141,7 +139,6 @@
141139
"@types/dom-to-image": "^2.6.4",
142140
"@types/jest": "^29.2.0",
143141
"@types/js-cookie": "^3.0.2",
144-
"@types/lodash": "^4.17.7",
145142
"@types/mixpanel-browser": "^2.38.1",
146143
"@types/node": "20.16.7",
147144
"@types/phoenix": "^1.5.4",

pages/_document.tsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ import config from 'configs/app';
1010
import theme from 'theme/theme';
1111
import * as svgSprite from 'ui/shared/IconSvg';
1212

13-
14-
import { inter, drukWide } from 'theme/foundations/typography';
15-
1613
class MyDocument extends Document {
1714
static async getInitialProps(ctx: DocumentContext) {
1815
const originalRenderPage = ctx.renderPage;
@@ -33,12 +30,11 @@ class MyDocument extends Document {
3330
return initialProps;
3431
}
3532

36-
// className={inter.className}
37-
3833
render() {
3934
return (
4035
<Html lang="en">
4136
<Head>
37+
{ /* FONTS */ }
4238
<link
4339
href={ config.UI.fonts.heading?.url ?? 'https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap' }
4440
rel="stylesheet"
@@ -60,7 +56,7 @@ class MyDocument extends Document {
6056
<link rel="icon" type="image/png" sizes="192x192" href="/assets/favicon/android-chrome-192x192.png"/>
6157
<link rel="preload" as="image" href={ svgSprite.href }/>
6258
</Head>
63-
<body className={`${inter.variable} ${drukWide.variable}`}>
59+
<body>
6460
<ColorModeScript initialColorMode={ theme.config.initialColorMode }/>
6561
<Main/>
6662
<NextScript/>

0 commit comments

Comments
 (0)