-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Performance imrovements: webpack config(uglify & chunks), code refactor
- Loading branch information
Showing
54 changed files
with
936 additions
and
480 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from "react" | ||
import { Web3OnboardProvider } from "@web3-onboard/react" | ||
import { Provider } from "react-redux" | ||
import web3Onboard from "shared/utils/web3Onboard" | ||
import { PostHogProvider } from "posthog-js/react" | ||
import { BrowserRouter as Router } from "react-router-dom" | ||
import GlobalStyles from "ui/GlobalStyles" | ||
import { POSTHOG_API_KEY, POSTHOG_API_OPTIONS } from "config/posthog" | ||
import Dapp from "ui/DApp/Dapp" | ||
import reduxStore from "./redux-state" | ||
|
||
export default function App() { | ||
return ( | ||
<> | ||
<GlobalStyles /> | ||
<PostHogProvider apiKey={POSTHOG_API_KEY} options={POSTHOG_API_OPTIONS}> | ||
<Provider store={reduxStore}> | ||
<Web3OnboardProvider web3Onboard={web3Onboard}> | ||
<Router> | ||
<Dapp /> | ||
</Router> | ||
</Web3OnboardProvider> | ||
</Provider> | ||
</PostHogProvider> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { PostHogConfig } from "posthog-js" | ||
|
||
export const { POSTHOG_API_KEY } = process.env | ||
|
||
export const POSTHOG_API_OPTIONS: Partial<PostHogConfig> = { | ||
persistence: "localStorage", | ||
autocapture: false, | ||
capture_pageview: false, | ||
disable_session_recording: true, | ||
sanitize_properties(properties) { | ||
return { | ||
...properties, | ||
// The extension has set an expectation that the lib is set to | ||
// the analytics env. | ||
$lib: process.env.ANALYTICS_ENV, | ||
} | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "./island" | ||
export * from "./reflect" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* eslint-disable import/prefer-default-export */ | ||
import { createContext, MutableRefObject } from "react" | ||
import { IslandContextType } from "shared/types" | ||
|
||
export const IslandContext = createContext<MutableRefObject<IslandContextType>>( | ||
{ | ||
current: { | ||
onRealmClick: () => {}, | ||
}, | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/* eslint-disable import/prefer-default-export */ | ||
import { createContext } from "react" | ||
import { ReflectInstance } from "shared/utils" | ||
|
||
export const ReflectContext = createContext<ReflectInstance | null>(null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.