Skip to content

Commit 68c9a66

Browse files
authored
Merge pull request #616 from subquery/feat/new-studio
feat: new studio
2 parents f83b81c + aab571b commit 68c9a66

37 files changed

+792
-1323
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@rainbow-me/rainbowkit": "^1.2.0",
2121
"@sentry/react": "^7.57.0",
2222
"@subql/apollo-links": "^1.2.3",
23-
"@subql/components": "1.0.3-20",
23+
"@subql/components": "1.0.3-21",
2424
"@subql/contract-sdk": "0.16.2",
2525
"@subql/network-clients": "^0.3.17",
2626
"@subql/network-config": "0.3.17-2",

src/App.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
// Copyright 2020-2022 SubQuery Pte Ltd authors & contributors
22
// SPDX-License-Identifier: Apache-2.0
33

4-
import React, { PropsWithChildren, useMemo } from 'react';
4+
import React, { PropsWithChildren } from 'react';
55
import { BrowserRouter } from 'react-router-dom';
66
import { AppInitProvider } from '@containers/AppInitialProvider';
7-
import { useStudioEnabled } from '@hooks';
8-
import { entryLinks, externalAppLinks, studioLink } from '@utils/links';
97

108
import { RainbowProvider } from './config/rainbowConf';
119
import { ChainStatus, Header } from './components';
@@ -40,15 +38,11 @@ const Providers: React.FC<PropsWithChildren> = ({ children }) => {
4038
};
4139

4240
const RenderRouter: React.FC = () => {
43-
const studioEnabled = useStudioEnabled();
44-
const calEntryLinks = useMemo(() => (studioEnabled ? [...entryLinks, studioLink] : [...entryLinks]), [studioEnabled]);
45-
4641
return (
4742
<BrowserRouter>
4843
<div className="Main">
4944
<div className="Header">
50-
{/* TODO: replace with component from ui library */}
51-
<Header appNavigation={calEntryLinks} dropdownLinks={{ label: 'Kepler', links: externalAppLinks }} />
45+
<Header />
5246
</div>
5347

5448
<div className="Content">
Lines changed: 6 additions & 156 deletions
Original file line numberDiff line numberDiff line change
@@ -1,159 +1,9 @@
11
.header {
2-
width: 100%;
3-
display: flex;
4-
justify-content: space-between;
5-
box-shadow: inset 0px -1px 0px rgba(26, 32, 44, 0.06);
6-
padding: 1rem 1.25rem;
7-
8-
.expandIcon {
9-
display: none;
10-
font-size: 40px;
11-
}
12-
13-
&Inner {
14-
width: 100%;
15-
}
16-
17-
&Logo {
18-
display: flex;
19-
}
20-
21-
&Right {
22-
display: flex;
23-
width: 100%;
24-
align-items: center;
25-
transition: all 0.2s linear;
26-
27-
}
28-
29-
.leftHeader {
30-
display: inline-flex;
31-
}
32-
}
33-
34-
.justifyBetween {
35-
justify-content: space-between;
36-
}
37-
38-
.flexCenter {
39-
display: flex;
40-
align-items: center;
41-
}
42-
43-
.leftElement {
44-
margin-left: 2rem;
45-
position: relative;
46-
}
47-
48-
.appDropdown {
49-
margin: 1rem;
50-
}
51-
52-
.menuOverlay {
53-
padding: 1rem !important;
54-
}
55-
56-
.dropMenu {
57-
width: 300px !important;
58-
}
59-
60-
.navLink {
61-
text-decoration: none;
62-
margin: 0 1vw;
63-
display: flex;
64-
color: var(--gray700);
65-
width: fit-content;
66-
}
67-
68-
.navLink:hover {
69-
text-decoration: underline;
70-
color: var(--sq-primary-blue);
71-
}
72-
73-
.navLinkCurrent {
74-
font-weight: 500;
75-
color: var(--sq-info);
76-
}
77-
78-
@media screen and (max-width: 600px) {
79-
.header {
80-
flex-direction: column;
81-
.expandIcon {
82-
display: inline-block;
83-
}
84-
85-
.middleHeader {
86-
width: 100%;
87-
}
88-
89-
&Logo {
90-
width: 100%;
91-
}
92-
93-
&Inner {
94-
flex-direction: column;
95-
width: 100vw;
96-
padding: 0 20px;
97-
.middleHeader {
98-
flex-direction: column;
99-
}
100-
101-
:global {
102-
#leftHeader {
103-
margin-left: 0;
104-
}
105-
}
106-
107-
.appDropdown {
108-
width: 100%;
109-
margin: 0;
110-
padding: 14px 0;
111-
border-bottom: 1px solid var(--sq-gray200);
112-
:global {
113-
.ant-space.ant-dropdown-trigger {
114-
margin: 0 1vw;
115-
}
116-
}
117-
}
118-
}
119-
120-
&Right {
121-
flex-direction: column;
122-
}
123-
124-
&Item {
125-
width: 100%;
126-
padding: 14px 0;
127-
border-top: 1px solid var(--sq-gray200);
128-
border-bottom: 1px solid var(--sq-gray200);
129-
130-
& + .headerItem {
131-
margin-top: -1px;
132-
}
133-
}
134-
135-
.hideOnMobile {
136-
height: 0;
137-
overflow: hidden;
138-
}
139-
140-
.showExpand {
141-
height: 570px;
142-
}
143-
144-
.right {
145-
width: 100%;
146-
margin-bottom: 8px;
147-
148-
&>a {
149-
width: 100%;
150-
}
151-
}
152-
153-
.leftHeader {
154-
border-top: 1px solid var(--sq-gray200);
155-
padding: 14px 0;
156-
width: 100%;
2+
:global {
3+
.subql-header {
4+
padding: 0 24px;
5+
display: flex;
6+
align-items: center;
1577
}
1588
}
159-
}
9+
}

0 commit comments

Comments
 (0)