Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"@gravity-ui/i18n": "^1.0.0",
"bem-cn-lite": "^4.0.0",
"lodash": "^4.17.21",
"react-github-btn": "^1.4.0",
"react-player": "^2.9.0",
"react-slick": "^0.28.1",
"react-spring": "^9.3.0",
Expand Down
6 changes: 0 additions & 6 deletions src/containers/PageConstructor/__stories__/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,6 @@
}
],
"rightItems": [
{
"type": "github-stars",
"text": "Star",
"label": "Star @gravity-ui/page-constructor on GitHub",
"url": "https://github.com/gravity-ui/page-constructor"
},
{
"type": "link",
"text": "Link",
Expand Down
13 changes: 2 additions & 11 deletions src/models/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export enum NavigationItemType {
Dropdown = 'dropdown',
Button = 'button',
Social = 'social',
GithubStars = 'github-stars',
}

export interface NavigationItemBase {
Expand All @@ -15,12 +14,6 @@ export interface NavigationItemBase {
url?: string;
}

export interface NavigationGithubButton extends Omit<NavigationItemBase, 'icon'> {
type: NavigationItemType.GithubStars;
url: string;
label?: string;
}

export interface NavigationLinkItem extends Omit<NavigationItemBase, 'url'> {
type: NavigationItemType.Link;
url: string;
Expand All @@ -46,15 +39,13 @@ export interface NavigationSocialItem extends Omit<NavigationItemBase, 'text'> {
export type NavigationItemModel =
| NavigationLinkItem
| NavigationButtonItem
| NavigationDropdownItem
| NavigationGithubButton;
| NavigationDropdownItem;

export type NavigationItemData =
| NavigationLinkItem
| NavigationButtonItem
| NavigationSocialItem
| DropdownItemData
| NavigationGithubButton;
| DropdownItemData;

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {BlockIdContext} from '../../../context/blockIdContext';
import {NavigationButton} from './components/NavigationButton/NavigationButton';
import {NavigationDropdown} from './components/NavigationDropdown/NavigationDropdown';
import {NavigationLink} from './components/NavigationLink/NavigationLink';
import {GithubStars} from './components/GithubStars/GithubStars';

const ANALYTICS_ID = 'navigation';

Expand All @@ -25,7 +24,6 @@ const NavigationItemsMap: Record<NavigationItemType, React.ComponentType<any>> =
[NavigationItemType.Social]: SocialIcon,
[NavigationItemType.Dropdown]: NavigationDropdown,
[NavigationItemType.Link]: NavigationLink,
[NavigationItemType.GithubStars]: GithubStars,
};

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

return (
<BlockIdContext.Provider value={ANALYTICS_ID}>
<Component {...componentProps} />;
<Component {...componentProps} />
</BlockIdContext.Provider>
);
};
Expand Down

This file was deleted.

This file was deleted.