Skip to content

Commit

Permalink
Merge pull request #224 from RobinNagpal/sami/categories-page
Browse files Browse the repository at this point in the history
Added a button to navbar for `tidibit-collection-categories`
  • Loading branch information
RobinNagpal authored May 20, 2024
2 parents acd4111 + 97f06d7 commit bd4d5aa
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
10 changes: 10 additions & 0 deletions src/components/main/TopNav/TopNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ function DesktopNavLinks({ space }: { space: Space }) {
if (feature.featureName === FeatureName.ByteCollections) {
return <DesktopNavLink key="tidbitCollections" href="/tidbit-collections" label="Tidbits" />;
}

if (feature.featureName === FeatureName.ByteCollectionCategories) {
return <DesktopNavLink key="byteCollectionCategories" href="/tidbit-collection-categories" label="Tidbits" />;
}

if (feature.featureName === FeatureName.Simulations) {
return <DesktopNavLink key="simulations" href="/simulations" label="Simulations" />;
}
Expand Down Expand Up @@ -91,6 +96,11 @@ function MobileNavLinks({ space }: { space: Space }) {
if (feature.featureName === FeatureName.ByteCollections) {
return <MobileNavLink key="tidbitCollections" href="/tidbit-collections" label="Tidbits" />;
}

if (feature.featureName === FeatureName.ByteCollectionCategories) {
return <MobileNavLink key="tidbitCollectionCategories" href="/tidbit-collection-categories" label="Tidbits" />;
}

if (feature.featureName === FeatureName.Simulations) {
return <MobileNavLink key="simulations" href="/simulations" label="Simulations" />;
}
Expand Down
4 changes: 4 additions & 0 deletions src/components/main/getLinkToFeaturePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export const getLinkToFeaturePage = (featureName: FeatureName): string => {
return '/tidbits';
}

if (featureName === FeatureName.ByteCollectionCategories) {
return '/tidbit-categories';
}

if (featureName === FeatureName.Timelines) {
return '/timelines';
}
Expand Down
7 changes: 7 additions & 0 deletions src/types/features/compoundFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ export const compoundFeatures: FeatureItem[] = [
priority: 80,
},
},
{
featureName: FeatureName.ByteCollectionCategories,
enabled: true,
details: {
priority: 75,
},
},
{
featureName: FeatureName.Guides,
enabled: true,
Expand Down
13 changes: 10 additions & 3 deletions src/types/features/testAcademyFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,33 @@ export const testAcademyFeatures: FeatureItem[] = [
},
},
{
featureName: FeatureName.Simulations,
featureName: FeatureName.ByteCollectionCategories,
enabled: true,
details: {
priority: 70,
},
},
{
featureName: FeatureName.ClickableDemos,
featureName: FeatureName.Simulations,
enabled: true,
details: {
priority: 65,
},
},
{
featureName: FeatureName.Timelines,
featureName: FeatureName.ClickableDemos,
enabled: true,
details: {
priority: 60,
},
},
{
featureName: FeatureName.Timelines,
enabled: true,
details: {
priority: 55,
},
},
{
featureName: FeatureName.Courses,
enabled: true,
Expand Down

0 comments on commit bd4d5aa

Please sign in to comment.