Skip to content

Commit

Permalink
More cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vinnyjth committed Mar 27, 2024
1 parent efe8aca commit e865642
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
4 changes: 2 additions & 2 deletions micro-service/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Metadata } from 'next';

export const metadata: Metadata = {
title: 'React App',
description: 'Web site created with Next.js.',
title: 'Apollos Embeds',
description: 'Apollos Web Embeds',
};

export default function RootLayout({ children }: { children: React.ReactNode }) {
Expand Down
3 changes: 1 addition & 2 deletions micro-service/src/utils/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
export const getChurchSlug = (host) => {
return 'cedar_creek';
let subdomain =
process.env.NODE_ENV === 'production'
? host.split('.').slice(0, -2).join('.')
: host.split('.').slice(0, -1).join('.');

if (process.env.NODE_ENV !== 'production' && !subdomain) {
subdomain = 'cedar-creek';
subdomain = 'apollos-demo';
}
return subdomain.replace(/-/g, '_');
};
5 changes: 2 additions & 3 deletions packages/web-shared/embeds/FeatureFeed.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { getComponentFromType } from '../utils/getContentFromURL';

function RenderFeatures(props) {
const [searchParams] = useSearchParams();
let _id = searchParams.get('id');
const _id = searchParams.get('id');

const { type, randomId } = parseSlugToIdAndType(_id) ?? {};

Expand Down Expand Up @@ -66,14 +66,13 @@ const FeatureFeed = (props) => {
itemId: props.featureFeed,
},
}}
featureFeed={props.featureFeed}
{...props}
/>
</Box>
) : (
<>
<Breadcrumbs />
<RenderFeatures {...props} featureFeed={props.featureFeed} />
<RenderFeatures {...props} />
</>
)}
</Box>
Expand Down
8 changes: 0 additions & 8 deletions packages/web-shared/providers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ import FeatureFeedProvider from './FeatureFeedProvider';
import ModalProvider from './ModalProvider';
import SearchProvider from './SearchProvider';
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
import {
StaticRouterProvider,
createStaticRouter,
createStaticHandler,
} from 'react-router-dom/server';

export {
AppProvider,
Expand All @@ -24,7 +19,4 @@ export {
SearchProvider,
createBrowserRouter,
RouterProvider,
StaticRouterProvider,
createStaticRouter,
createStaticHandler,
};

0 comments on commit e865642

Please sign in to comment.