Merge branch 'main' of https://github.com/MkSaaSHQ/mksaas-template into dev/credits

This commit is contained in:
javayhu 2025-07-02 23:46:20 +08:00
commit da26c2cf5d
5 changed files with 8 additions and 9 deletions

View File

@ -124,14 +124,11 @@ NEXT_PUBLIC_DATAFAST_DOMAIN=""
# -----------------------------------------------------------------------------
# Discord
# Notification (Discord)
# -----------------------------------------------------------------------------
DISCORD_WEBHOOK_URL=""
NEXT_PUBLIC_DISCORD_WIDGET_SERVER_ID=""
NEXT_PUBLIC_DISCORD_WIDGET_CHANNEL_ID=""
# -----------------------------------------------------------------------------
# Feishu
# Notification (Feishu)
# -----------------------------------------------------------------------------
FEISHU_WEBHOOK_URL=""

View File

@ -1,4 +1,5 @@
import { useState } from 'react';
import type { GenerateImageResponse } from '../lib/api-types';
import type {
ImageError,
ImageResult,
@ -89,7 +90,7 @@ export function useImageGeneration(): UseImageGenerationReturn {
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(request),
});
const data = await response.json();
const data = (await response.json()) as GenerateImageResponse;
if (!response.ok) {
throw new Error(data.error || `Server error: ${response.status}`);
}

View File

@ -73,8 +73,6 @@ export default async function HomePage(props: HomePageProps) {
<TestimonialsSection />
<NewsletterCard />
<DiscordWidget />
</div>
</>
);

View File

@ -9,6 +9,9 @@ import { useEffect, useRef, useState } from 'react';
/**
* Discord Widget, shows the channels and messages in the discord server
*
* @deprecated
* This feature is deprecated for Discord Widget can not be used anymore.
*
* https://docs.widgetbot.io/embed/react-embed/
*/
export default function DiscordWidget() {

View File

@ -66,7 +66,7 @@ export interface SocialConfig {
* Website features
*/
export interface FeaturesConfig {
enableDiscordWidget?: boolean; // Whether to enable the discord widget
enableDiscordWidget?: boolean; // Whether to enable the discord widget, deprecated
enableUpgradeCard?: boolean; // Whether to enable the upgrade card in the sidebar
enableAffonsoAffiliate?: boolean; // Whether to enable affonso affiliate
enablePromotekitAffiliate?: boolean; // Whether to enable promotekit affiliate