Skip to content

Commit e32a51a

Browse files
authored
fix: uninstall react-github-btn because is hot support cjs (#188)
1 parent 1ba0dc9 commit e32a51a

File tree

7 files changed

+3
-73
lines changed

7 files changed

+3
-73
lines changed

package-lock.json

Lines changed: 0 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
"@gravity-ui/i18n": "^1.0.0",
5050
"bem-cn-lite": "^4.0.0",
5151
"lodash": "^4.17.21",
52-
"react-github-btn": "^1.4.0",
5352
"react-player": "^2.9.0",
5453
"react-slick": "^0.28.1",
5554
"react-spring": "^9.3.0",

src/containers/PageConstructor/__stories__/data.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,6 @@
308308
}
309309
],
310310
"rightItems": [
311-
{
312-
"type": "github-stars",
313-
"text": "Star",
314-
"label": "Star @gravity-ui/page-constructor on GitHub",
315-
"url": "https://github.com/gravity-ui/page-constructor"
316-
},
317311
{
318312
"type": "link",
319313
"text": "Link",

src/models/navigation.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export enum NavigationItemType {
66
Dropdown = 'dropdown',
77
Button = 'button',
88
Social = 'social',
9-
GithubStars = 'github-stars',
109
}
1110

1211
export interface NavigationItemBase {
@@ -15,12 +14,6 @@ export interface NavigationItemBase {
1514
url?: string;
1615
}
1716

18-
export interface NavigationGithubButton extends Omit<NavigationItemBase, 'icon'> {
19-
type: NavigationItemType.GithubStars;
20-
url: string;
21-
label?: string;
22-
}
23-
2417
export interface NavigationLinkItem extends Omit<NavigationItemBase, 'url'> {
2518
type: NavigationItemType.Link;
2619
url: string;
@@ -46,15 +39,13 @@ export interface NavigationSocialItem extends Omit<NavigationItemBase, 'text'> {
4639
export type NavigationItemModel =
4740
| NavigationLinkItem
4841
| NavigationButtonItem
49-
| NavigationDropdownItem
50-
| NavigationGithubButton;
42+
| NavigationDropdownItem;
5143

5244
export type NavigationItemData =
5345
| NavigationLinkItem
5446
| NavigationButtonItem
5547
| NavigationSocialItem
56-
| DropdownItemData
57-
| NavigationGithubButton;
48+
| DropdownItemData;
5849

5950
export type DropdownItemData = Omit<NavigationDropdownItem, 'items'>;
6051

src/navigation/components/NavigationItem/NavigationItem.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {BlockIdContext} from '../../../context/blockIdContext';
77
import {NavigationButton} from './components/NavigationButton/NavigationButton';
88
import {NavigationDropdown} from './components/NavigationDropdown/NavigationDropdown';
99
import {NavigationLink} from './components/NavigationLink/NavigationLink';
10-
import {GithubStars} from './components/GithubStars/GithubStars';
1110

1211
const ANALYTICS_ID = 'navigation';
1312

@@ -25,7 +24,6 @@ const NavigationItemsMap: Record<NavigationItemType, React.ComponentType<any>> =
2524
[NavigationItemType.Social]: SocialIcon,
2625
[NavigationItemType.Dropdown]: NavigationDropdown,
2726
[NavigationItemType.Link]: NavigationLink,
28-
[NavigationItemType.GithubStars]: GithubStars,
2927
};
3028

3129
const NavigationItem: React.FC<NavigationItemProps> = ({data, className, ...props}) => {
@@ -42,7 +40,7 @@ const NavigationItem: React.FC<NavigationItemProps> = ({data, className, ...prop
4240

4341
return (
4442
<BlockIdContext.Provider value={ANALYTICS_ID}>
45-
<Component {...componentProps} />;
43+
<Component {...componentProps} />
4644
</BlockIdContext.Provider>
4745
);
4846
};

src/navigation/components/NavigationItem/components/GithubStars/GithubStars.scss

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/navigation/components/NavigationItem/components/GithubStars/GithubStars.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)