Refactor code and improve usage of package dependencies

This commit updates the naming convention of icons from Lucide-React, moving some package dependencies to "peerDependencies" in 'team-accounts', 'admin' and 'auth'. Additionally, it includes tweaks to the development server command in apps/web package.json and adds a logger reference to the shared package. Furthermore, cleanup work has been performed within the features and UI packages, and new scripts to interact with Stripe have been added to the root package.json.
This commit is contained in:
giancarlo
2024-03-26 01:34:19 +08:00
parent 95793c42b4
commit ee507e0816
92 changed files with 1691 additions and 1270 deletions

View File

@@ -4,7 +4,7 @@ import { getServerSideSitemap } from 'next-sitemap';
import appConfig from '~/config/app.config';
const siteUrl = appConfig.url;
invariant(appConfig.url, 'No NEXT_PUBLIC_SITE_URL environment variable found');
export async function GET() {
const urls = getSiteUrls();
@@ -15,35 +15,29 @@ export async function GET() {
}
function getSiteUrls() {
invariant(siteUrl, 'No NEXT_PUBLIC_SITE_URL found');
const urls = ['', 'faq', 'pricing'];
const urls = ['/', 'faq', 'pricing'];
return urls.map((url) => {
return {
loc: new URL(siteUrl, url).href,
loc: new URL(url, appConfig.url).href,
lastmod: new Date().toISOString(),
};
});
}
function getPostsSitemap() {
invariant(siteUrl, 'No NEXT_PUBLIC_SITE_URL found');
return allPosts.map((post) => {
return {
loc: new URL(siteUrl, post.url).href,
loc: new URL(post.url, appConfig.url).href,
lastmod: new Date().toISOString(),
};
});
}
function getDocsSitemap() {
invariant(siteUrl, 'No NEXT_PUBLIC_SITE_URL found');
return allDocumentationPages.map((page) => {
return {
loc: new URL(siteUrl, page.url).href,
loc: new URL(page.url, appConfig.url).href,
lastmod: new Date().toISOString(),
};
});