🐛 fix(subscribe): Extract Domain
This commit is contained in:
@@ -6,10 +6,7 @@ export default async function DashboardLayout({ children }: { children: React.Re
|
||||
return (
|
||||
<SidebarProvider className='container'>
|
||||
<SidebarLeft className='sticky top-[84px] hidden w-52 border-r-0 bg-transparent lg:flex' />
|
||||
<SidebarInset className='relative p-4'>
|
||||
{/* <Header /> */}
|
||||
{children}
|
||||
</SidebarInset>
|
||||
<SidebarInset className='relative p-4'>{children}</SidebarInset>
|
||||
<SidebarRight className='sticky top-[84px] hidden w-52 border-r-0 bg-transparent 2xl:flex' />
|
||||
</SidebarProvider>
|
||||
);
|
||||
|
||||
@@ -64,6 +64,7 @@ export default async function RootLayout({ children }: { children: React.ReactNo
|
||||
|
||||
try {
|
||||
config = await getGlobalConfig({ skipErrorHandler: true }).then((res) => res.data.data);
|
||||
console.log(config);
|
||||
} catch (error) {
|
||||
/* empty */
|
||||
}
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { buttonVariants } from '@shadcn/ui/button';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import Image from 'next/legacy/image';
|
||||
import Link from 'next/link';
|
||||
import LanguageSwitch from './language-switch';
|
||||
// import { MobileSidebar } from './mobile-sidebar';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import ThemeSwitch from './theme-switch';
|
||||
import { UserNav } from './user-nav';
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ export const useGlobalStore = create<GlobalStore>((set, get) => ({
|
||||
const { pan_domain, subscribe_domain, subscribe_path } = get().common.subscribe || {};
|
||||
const domains = subscribe_domain
|
||||
? subscribe_domain.split('\n')
|
||||
: [extractDomain(NEXT_PUBLIC_API_URL || NEXT_PUBLIC_SITE_URL || '')];
|
||||
: [extractDomain(NEXT_PUBLIC_API_URL || NEXT_PUBLIC_SITE_URL || '', pan_domain)];
|
||||
|
||||
return domains.map((domain) => {
|
||||
const enc_type = type ? Base64.stringify(UTF8.parse(type)) : '';
|
||||
|
||||
Reference in New Issue
Block a user