Skip to content

Commit 1b8fd33

Browse files
committed
Get rid of global SharingOptions type and make it local for story page
1 parent 68c05be commit 1b8fd33

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

modules/Story/Share/Share.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import { Button } from '@/components/Button';
66
import { Divider } from '@/components/Divider';
77
import { SocialShare } from '@/components/SocialShare';
88
import { IconFileDown, IconFolderDown, IconLink, IconText } from '@/icons';
9-
import type { SharingOptions, StoryActions } from 'theme-settings';
9+
import type { StoryActions } from 'theme-settings';
10+
11+
import type { SharingOptions } from '../type';
1012

1113
import styles from './Share.module.scss';
1214

modules/Story/Story.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ import { FormattedDate } from '@/adapters/client';
77
import { app } from '@/adapters/server';
88
import { CategoriesList } from '@/components/CategoriesList';
99
import { ContentRenderer } from '@/components/ContentRenderer';
10-
import type { SharingOptions, StoryActions, ThemeSettings } from 'theme-settings';
10+
import type { StoryActions, ThemeSettings } from 'theme-settings';
1111

1212
import { Embargo } from './Embargo';
1313
import { HeaderImageRenderer } from './HeaderImageRenderer';
1414
import { HeaderRenderer } from './HeaderRenderer';
1515
import { getHeaderAlignment } from './lib';
1616
import { Share } from './Share';
17+
import type { SharingOptions } from './type';
1718

1819
import styles from './Story.module.scss';
1920

modules/Story/type.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import type { ThemeSettings } from 'theme-settings';
2+
3+
export type SharingOptions = Pick<ThemeSettings, 'share_icons_placement' | 'sharing_actions'>;

theme-settings.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ export interface ThemeSettings {
5656
text_color: string;
5757
}
5858

59-
export type SharingOptions = Pick<ThemeSettings, 'share_icons_placement' | 'sharing_actions'>;
60-
6159
export type StoryActions = Pick<
6260
ThemeSettings,
6361
'show_copy_content' | 'show_download_assets' | 'show_download_pdf' | 'show_copy_url'

0 commit comments

Comments
 (0)