Merge branch 'main' of https://github.com/MkSaaSHQ/mksaas-template into dev/credits
This commit is contained in:
commit
da26c2cf5d
@ -124,14 +124,11 @@ NEXT_PUBLIC_DATAFAST_DOMAIN=""
|
|||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Discord
|
# Notification (Discord)
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
DISCORD_WEBHOOK_URL=""
|
DISCORD_WEBHOOK_URL=""
|
||||||
NEXT_PUBLIC_DISCORD_WIDGET_SERVER_ID=""
|
|
||||||
NEXT_PUBLIC_DISCORD_WIDGET_CHANNEL_ID=""
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Feishu
|
# Notification (Feishu)
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
FEISHU_WEBHOOK_URL=""
|
FEISHU_WEBHOOK_URL=""
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
import type { GenerateImageResponse } from '../lib/api-types';
|
||||||
import type {
|
import type {
|
||||||
ImageError,
|
ImageError,
|
||||||
ImageResult,
|
ImageResult,
|
||||||
@ -89,7 +90,7 @@ export function useImageGeneration(): UseImageGenerationReturn {
|
|||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify(request),
|
body: JSON.stringify(request),
|
||||||
});
|
});
|
||||||
const data = await response.json();
|
const data = (await response.json()) as GenerateImageResponse;
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(data.error || `Server error: ${response.status}`);
|
throw new Error(data.error || `Server error: ${response.status}`);
|
||||||
}
|
}
|
||||||
|
@ -73,8 +73,6 @@ export default async function HomePage(props: HomePageProps) {
|
|||||||
<TestimonialsSection />
|
<TestimonialsSection />
|
||||||
|
|
||||||
<NewsletterCard />
|
<NewsletterCard />
|
||||||
|
|
||||||
<DiscordWidget />
|
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -9,6 +9,9 @@ import { useEffect, useRef, useState } from 'react';
|
|||||||
/**
|
/**
|
||||||
* Discord Widget, shows the channels and messages in the discord server
|
* 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/
|
* https://docs.widgetbot.io/embed/react-embed/
|
||||||
*/
|
*/
|
||||||
export default function DiscordWidget() {
|
export default function DiscordWidget() {
|
||||||
|
2
src/types/index.d.ts
vendored
2
src/types/index.d.ts
vendored
@ -66,7 +66,7 @@ export interface SocialConfig {
|
|||||||
* Website features
|
* Website features
|
||||||
*/
|
*/
|
||||||
export interface FeaturesConfig {
|
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
|
enableUpgradeCard?: boolean; // Whether to enable the upgrade card in the sidebar
|
||||||
enableAffonsoAffiliate?: boolean; // Whether to enable affonso affiliate
|
enableAffonsoAffiliate?: boolean; // Whether to enable affonso affiliate
|
||||||
enablePromotekitAffiliate?: boolean; // Whether to enable promotekit affiliate
|
enablePromotekitAffiliate?: boolean; // Whether to enable promotekit affiliate
|
||||||
|
Loading…
Reference in New Issue
Block a user