Skip to content

Commit e9c8d86

Browse files
committed
Formatting
1 parent c4ab0e4 commit e9c8d86

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

packages/gitbook/src/app/(site)/fetch.ts

+6-5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export interface PageIdParams {
2121
pageId: string;
2222
}
2323

24-
type SectionsList = { list: SiteSection[]; section: SiteSection; };
24+
type SectionsList = { list: SiteSection[]; section: SiteSection };
2525

2626
/**
2727
* Fetch all the data needed to render the content layout.
@@ -42,9 +42,10 @@ export async function fetchContentData() {
4242
const site = siteStructure.site;
4343

4444
const siteSections = getSiteSectionsList(content.siteSectionId, siteStructure.sections);
45-
45+
4646
const spaces =
47-
siteStructure.spaces ?? (siteSections ? parseSpacesFromSiteSpaces(siteSections.section.siteSpaces) : []);
47+
siteStructure.spaces ??
48+
(siteSections ? parseSpacesFromSiteSpaces(siteSections.section.siteSpaces) : []);
4849

4950
// we grab the space attached to the parent as it contains overriden customizations
5051
const spaceRelativeToParent = spaces?.find((space) => space.id === content.spaceId);
@@ -68,11 +69,11 @@ function getSiteSectionsList(siteSectionId?: string, sections?: SiteSection[] |
6869
return null;
6970
}
7071
const section = sections?.find((section) => section.id === siteSectionId);
71-
assert(sectionIsDefined(section), "A section must be defined when there are multiple sections");
72+
assert(sectionIsDefined(section), 'A section must be defined when there are multiple sections');
7273
return { list: sections, section } satisfies SectionsList;
7374
}
7475

75-
function sectionIsDefined(section?: SiteSection): section is NonNullable<SiteSection> {
76+
function sectionIsDefined(section?: SiteSection): section is NonNullable<SiteSection> {
7677
return typeof section !== 'undefined' && section !== null;
7778
}
7879

packages/gitbook/src/components/SiteSectionTabs/SiteSectionTab.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { Button, Link } from '../primitives';
1010
/**
1111
* A set of tabs representing site sections for multi-section sites
1212
*/
13-
export function SiteSectionTabs(props: { sections: SiteSection[], section: SiteSection }) {
13+
export function SiteSectionTabs(props: { sections: SiteSection[]; section: SiteSection }) {
1414
const { sections, section: currentSection } = props;
1515

1616
const tabs = sections.map((section) => ({

packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function SpaceLayout(props: {
3131
contentTarget: ContentTarget;
3232
space: Space;
3333
site: Site | null;
34-
sections: { list: SiteSection[], section: SiteSection } | null;
34+
sections: { list: SiteSection[]; section: SiteSection } | null;
3535
spaces: Space[];
3636
customization: CustomizationSettings | SiteCustomizationSettings;
3737
pages: Revision['pages'];

0 commit comments

Comments
 (0)