chore: support config for discord widget feature
This commit is contained in:
parent
1e203f4e87
commit
38bb93fa4f
@ -12,6 +12,7 @@ import StatsSection from '@/components/blocks/stats/stats';
|
||||
import TestimonialsSection from '@/components/blocks/testimonials/testimonials';
|
||||
import { NewsletterCard } from '@/components/newsletter/newsletter-card';
|
||||
import DiscordWidget from '@/components/shared/discord-widget';
|
||||
import { websiteConfig } from '@/config/website';
|
||||
import { constructMetadata } from '@/lib/metadata';
|
||||
import { getUrlWithLocale } from '@/lib/urls/urls';
|
||||
import type { Metadata } from 'next';
|
||||
@ -74,7 +75,7 @@ export default async function HomePage(props: HomePageProps) {
|
||||
|
||||
<NewsletterCard />
|
||||
|
||||
<DiscordWidget />
|
||||
{websiteConfig.features.enableDiscordWidget && <DiscordWidget />}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
@ -32,6 +32,9 @@ export const websiteConfig: WebsiteConfig = {
|
||||
youtube: 'https://mksaas.link/youtube',
|
||||
},
|
||||
},
|
||||
features: {
|
||||
enableDiscordWidget: true,
|
||||
},
|
||||
routes: {
|
||||
defaultLoginRedirect: '/dashboard',
|
||||
},
|
||||
|
8
src/types/index.d.ts
vendored
8
src/types/index.d.ts
vendored
@ -5,6 +5,7 @@ import type { ReactNode } from 'react';
|
||||
*/
|
||||
export type WebsiteConfig = {
|
||||
metadata: MetadataConfig;
|
||||
features: FeaturesConfig;
|
||||
routes: RoutesConfig;
|
||||
analytics: AnalyticsConfig;
|
||||
auth: AuthConfig;
|
||||
@ -60,6 +61,13 @@ export interface SocialConfig {
|
||||
telegram?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Website features
|
||||
*/
|
||||
export interface FeaturesConfig {
|
||||
enableDiscordWidget?: boolean; // Whether to enable the discord widget
|
||||
}
|
||||
|
||||
/**
|
||||
* Routes configuration
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user