Skip to content

Commit a78a332

Browse files
authored
Merge pull request #318 from compolabs/feat/new-onboarding
New onboarding
2 parents ef785ed + ef52db9 commit a78a332

File tree

102 files changed

+1366
-1209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+1366
-1209
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ This project is licensed under the Business Source License 1.1. Please see the L
4848
For more information on V12 and how to get involved, please visit our [official website](https://docs.sprk.fi/).
4949

5050

51+

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"@compolabs/tradingview-chart": "^1.0.21",
2222
"@emotion/react": "^11.11.3",
2323
"@emotion/styled": "^11.11.0",
24+
"@fontsource/chakra-petch": "^5.1.1",
2425
"@fuels/connectors": "^0.36.1",
2526
"@fuels/react": "^0.36.1",
2627
"@intercom/messenger-js-sdk": "^0.0.14",
@@ -51,6 +52,7 @@
5152
"react": "^18.2.0",
5253
"react-content-loader": "^7.0.2",
5354
"react-dom": "^18.2.0",
55+
"react-joyride": "^2.9.3",
5456
"react-loading-skeleton": "^3.3.1",
5557
"react-modal-sheet": "^2.2.1",
5658
"react-popper-tooltip": "^4.4.2",

pnpm-lock.yaml

+125
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/App.tsx

+14-7
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
1-
import React from "react";
1+
import React, { useState } from "react";
22
import { Navigate, Route, Routes } from "react-router-dom";
33
import styled from "@emotion/styled";
44
import { observer } from "mobx-react";
55
import Competitions from "src/screens/Competitions";
66
import Leaderboard from "src/screens/Leaderboard";
77

8+
import ConnectWalletDialog from "@components/ConnectWalletDialog";
89
import { Column } from "@components/Flex";
910
import Header from "@components/Header";
11+
import { MobileAppStoreSheet } from "@components/Modal/MobileAppStoreSheet";
12+
import { Onboarding } from "@components/Onboarding";
1013
import { HeaderPoints } from "@components/Points/HeaderPoints";
14+
import WalletConnectors from "@components/WalletConnectors";
1115

1216
import { useClearUrlParam } from "@hooks/useClearUrlParam";
13-
import { usePrivateKeyAsAuth } from "@hooks/usePrivateKeyAsAuth";
17+
import { useMedia } from "@hooks/useMedia";
1418
import { useStores } from "@stores";
1519
import { MODAL_TYPE } from "@stores/ModalStore";
1620

1721
import SideManageAssets from "@screens/Assets/SideManageAssets/SideManageAssets";
18-
import ConnectWalletDialog from "@screens/ConnectWallet";
1922
import Dashboard from "@screens/Dashboard";
2023
import Faucet from "@screens/Faucet";
2124
import SpotScreen from "@screens/SpotScreen";
@@ -29,12 +32,15 @@ import { DiscordProvider } from "@src/providers/DiscordProvider";
2932

3033
const App: React.FC = observer(() => {
3134
const { modalStore, tradeStore } = useStores();
35+
const media = useMedia();
36+
37+
const [isAppStoreSheetVisible, setIsAppStoreSheetVisible] = useState(() => media.mobile);
3238

3339
// This hooks is used to clear unnecessary URL parameters,
3440
// specifically "tx_id", after returning from the faucet
3541
useClearUrlParam("tx_id");
3642

37-
usePrivateKeyAsAuth();
43+
// usePrivateKeyAsAuth();
3844

3945
return (
4046
<IntercomProvider>
@@ -56,9 +62,10 @@ const App: React.FC = observer(() => {
5662
<Route element={<Stats />} path={ROUTES.STATS} />
5763
</Routes>
5864
<SideManageAssets />
59-
{/*<PWAModal />*/}
60-
{/*<SplashScreen />*/}
61-
<ConnectWalletDialog visible={modalStore.isOpen(MODAL_TYPE.CONNECT_MODAL)} onClose={modalStore.close} />
65+
<WalletConnectors visible={modalStore.isOpen(MODAL_TYPE.SELECT_WALLET)} onClose={modalStore.close} />
66+
<ConnectWalletDialog visible={modalStore.isOpen(MODAL_TYPE.CONNECT)} onClose={modalStore.close} />
67+
<MobileAppStoreSheet isOpen={isAppStoreSheetVisible} onClose={() => setIsAppStoreSheetVisible(false)} />
68+
<Onboarding />
6269
</Root>
6370
</UnderConstructionProvider>
6471
</FeatureToggleProvider>

src/assets/icons/arrowRightNew.svg

+3
Loading

src/assets/icons/arrowUpNew.svg

+3
Loading

src/assets/icons/arrowUpRight.svg

+11
Loading

src/assets/onboarding/app-store.webp

2.29 KB
Binary file not shown.

src/assets/onboarding/fuelet.webp

704 Bytes
Binary file not shown.
2.12 KB
Binary file not shown.
7.02 KB
Binary file not shown.

src/components/Button.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { css } from "@emotion/react";
22
import styled from "@emotion/styled";
33

4-
import { TEXT_TYPES, TEXT_TYPES_MAP } from "@components/Text";
4+
import { TEXT_TYPES_MAP } from "@components/Text";
55
import { media } from "@themes/breakpoints";
66

77
export interface ButtonProps {
@@ -21,7 +21,7 @@ const Button = styled.button<ButtonProps>`
2121
justify-content: center;
2222
align-items: center;
2323
box-sizing: border-box;
24-
${TEXT_TYPES_MAP[TEXT_TYPES.BUTTON]}
24+
${TEXT_TYPES_MAP.BUTTON}
2525
height: 40px;
2626
padding: 0 16px;
2727
border-radius: 32px;
@@ -173,7 +173,7 @@ export const ButtonGroup = styled.div`
173173
height: 32px;
174174
}
175175
176-
${TEXT_TYPES_MAP[TEXT_TYPES.BUTTON_SECONDARY]}
176+
${TEXT_TYPES_MAP.BUTTON_SECONDARY}
177177
:hover {
178178
background: ${({ theme }) => theme.colors.borderPrimary};
179179
}

0 commit comments

Comments
 (0)