diff --git a/.gitignore b/.gitignore index 7fbaf973..8fe4f7f1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ # dependencies */node_modules /node_modules +node_modules + /.pnp .pnp.js @@ -31,4 +33,5 @@ yarn-error.log* .eslintcache .parcel-cache -.next \ No newline at end of file +.next +dist \ No newline at end of file diff --git a/micro-service/jsconfig.json b/micro-service/jsconfig.json deleted file mode 100644 index 36aa1a4d..00000000 --- a/micro-service/jsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": "." - } -} diff --git a/micro-service/next-env.d.ts b/micro-service/next-env.d.ts new file mode 100644 index 00000000..4f11a03d --- /dev/null +++ b/micro-service/next-env.d.ts @@ -0,0 +1,5 @@ +/// +/// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/micro-service/next.config.mjs b/micro-service/next.config.mjs new file mode 100644 index 00000000..4678774e --- /dev/null +++ b/micro-service/next.config.mjs @@ -0,0 +1,4 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = {}; + +export default nextConfig; diff --git a/micro-service/package.json b/micro-service/package.json index 370147fb..2c1cad90 100644 --- a/micro-service/package.json +++ b/micro-service/package.json @@ -4,57 +4,31 @@ "version": "0.1.0", "license": "MIT", "dependencies": { - "@algolia/autocomplete-js": "^1.9.2", - "@algolia/autocomplete-plugin-query-suggestions": "^1.9.2", - "@algolia/autocomplete-plugin-recent-searches": "^1.9.2", - "@algolia/autocomplete-preset-algolia": "^1.9.2", - "@algolia/autocomplete-theme-classic": "^1.9.2", "@apollo/client": "^3.7.4", "@apollosproject/web-shared": "link:../packages/web-shared", - "@babel/preset-react": "^7.22.5", "@craco/craco": "^7.0.0", "@segment/analytics-next": "^1.62.0", "@sentry/react": "^7.40.0", "@styled-system/theme-get": "^5.1.2", "@testing-library/jest-dom": "^5.11.4", "@testing-library/react": "^11.1.0", - "@testing-library/user-event": "^12.1.10", - "@phosphor-icons/react": "2.0.15", - "algoliasearch": "^4.17.0", "amplitude-js": "^8.21.9", - "apollo-upload-client": "^17.0.0", - "apollo3-cache-persist": "^0.14.1", "autoprefixer": "^9.8.6", - "base-64": "^1.0.0", - "color": "^4.2.3", - "date-fns": "^2.29.3", - "dompurify": "^2.4.3", - "graphql": "^16.6.0", - "lodash": "^4.17.21", - "moment": "^2.29.1", - "postcss": "^7.0.39", + "next": "^14.1.4", "prop-types": "^15.8.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-image-crop": "^10.0.11", - "react-instantsearch-dom": "^6.40.0", - "react-instantsearch-hooks-web": "^6.44.0", - "react-multi-carousel": "^2.8.2", - "react-player": "^2.11.2", - "react-router-dom": "^6.7.0", "react-scripts": "^5.0.1", "react-transition-group": "^4.4.5", - "styled-components": "^5.3.6", "styled-system": "^5.1.5", "tldts": "^6.0.20", - "uuid": "^9.0.0", "web-vitals": "^0.2.4" }, "scripts": { "eject": "react-scripts eject", - "dev": "craco start", - "build": "craco build", - "test": "craco test" + "dev": "next dev", + "build": "next build", + "start": "next start" }, "eslintConfig": { "extends": [ @@ -75,11 +49,8 @@ ] }, "devDependencies": { - "@babel/core": "^7.22.5", - "@babel/plugin-proposal-private-property-in-object": "^7.21.11", - "@babel/runtime": "^7.22.5", - "babel-plugin-module-resolver": "^5.0.0", - "babel-plugin-styled-components": "^2.1.4" + "@types/react": "18.2.72", + "typescript": "5.4.3" }, "targets": { "global": { diff --git a/micro-service/public/apollos-mock-up.png b/micro-service/public/apollos-mock-up.png deleted file mode 100644 index f0f20e85..00000000 Binary files a/micro-service/public/apollos-mock-up.png and /dev/null differ diff --git a/micro-service/public/index.html b/micro-service/public/index.html deleted file mode 100644 index 17aae5b8..00000000 --- a/micro-service/public/index.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - Apollos Web Embeds - - - - - -
- - - - \ No newline at end of file diff --git a/micro-service/public/manifest.json b/micro-service/public/manifest.json deleted file mode 100644 index 080d6c77..00000000 --- a/micro-service/public/manifest.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/micro-service/src/App.js b/micro-service/src/App.js index 7fe01bed..59b932fb 100644 --- a/micro-service/src/App.js +++ b/micro-service/src/App.js @@ -1,8 +1,12 @@ +'use client'; import React from 'react'; import * as Sentry from '@sentry/react'; import { FeatureFeed } from '@apollosproject/web-shared/embeds'; -import { AppProvider } from '@apollosproject/web-shared/providers'; -import { createBrowserRouter, RouterProvider } from 'react-router-dom'; +import { + AppProvider, + createBrowserRouter, + RouterProvider, +} from '@apollosproject/web-shared/providers'; import { Button, Box, BodyText } from '@apollosproject/web-shared/ui-kit'; import { Logo } from '@apollosproject/web-shared/components'; @@ -11,6 +15,7 @@ import Styled from './App.styles'; import ErrorPage from './error-page'; import { parseSlugToIdAndType } from '@apollosproject/web-shared/utils'; +import { getChurchSlug } from './utils'; Sentry.init({ dsn: process.env.REACT_APP_SENTRY_DSN, @@ -21,54 +26,55 @@ Sentry.init({ function ChurchLogo(props) { const { currentChurch } = useCurrentChurch(); - const favicon = document.getElementById('favicon'); - if (currentChurch?.logo) { - favicon.href = currentChurch.logo; + + //Can't set favicon in SSR + if (typeof document !== 'undefined') { + const favicon = document.querySelector('link[rel="icon"]'); + if (currentChurch?.logo) { + favicon.href = currentChurch.logo; + } } + return ; } -function App(props) { - let subdomain = - process.env.NODE_ENV === 'production' - ? window.location.hostname.split('.').slice(0, -2).join('.') - : window.location.hostname.split('.').slice(0, -1).join('.'); - - if (process.env.NODE_ENV !== 'production' && !subdomain) { - subdomain = 'apollos-demo'; - } - const churchSlug = subdomain.replace(/-/g, '_'); - const searchParams = new URLSearchParams(window.location.search); - const _root = searchParams.get('root'); +function App({ searchParams, url }) { + const churchSlug = getChurchSlug(url); + const _root = searchParams?.root; const { type, randomId } = parseSlugToIdAndType(_root) ?? {}; - const router = createBrowserRouter([ + const ssr = typeof document === 'undefined'; + + const mainRoute = ( + + + + ); + + const routerConfig = [ { path: '/', - element: ( - - - - ), + element: mainRoute, errorElement: , }, - ]); + ]; + + const router = ssr ? null : createBrowserRouter(routerConfig); // Widgets require a church slug to get the correct data if (churchSlug) { return ( - + {/** When using SSR, avoid the router. it crashes */} + {ssr ? mainRoute : } ); } // eslint-disable-next-line no-console - console.log( - `⚠️ Feature Feed could not render feed of id "FeatureFeed:5aae43e6-3526-4cd2-8dfe-771d2ce8a333"` - ); + console.log(`⚠️ Feature Feed could not render feed of id ${searchParams?.root}`); return ( diff --git a/micro-service/src/App.styles.js b/micro-service/src/App.styles.js index 9a9a09a4..a4208faa 100644 --- a/micro-service/src/App.styles.js +++ b/micro-service/src/App.styles.js @@ -1,7 +1,5 @@ -import { withTheme } from 'styled-components'; -import styled, { css } from 'styled-components'; import { themeGet } from '@styled-system/theme-get'; -import { H1, TypeStyles } from '@apollosproject/web-shared/ui-kit'; +import { H1, TypeStyles, withTheme, styled } from '@apollosproject/web-shared/ui-kit'; import { system } from '@apollosproject/web-shared/ui-kit/_lib/system'; diff --git a/micro-service/public/.well-known/apple-app-site-association b/micro-service/src/app/.well-known/apple-app-site-association similarity index 100% rename from micro-service/public/.well-known/apple-app-site-association rename to micro-service/src/app/.well-known/apple-app-site-association diff --git a/micro-service/src/app/[[...slug]]/client.tsx b/micro-service/src/app/[[...slug]]/client.tsx new file mode 100644 index 00000000..176fa911 --- /dev/null +++ b/micro-service/src/app/[[...slug]]/client.tsx @@ -0,0 +1,8 @@ +import React from 'react'; +import dynamic from 'next/dynamic'; + +const App = dynamic(() => import('../../App'), { ssr: true }); + +export function ClientOnly(props) { + return ; +} diff --git a/micro-service/src/app/[[...slug]]/page.js b/micro-service/src/app/[[...slug]]/page.js new file mode 100644 index 00000000..9174bdd0 --- /dev/null +++ b/micro-service/src/app/[[...slug]]/page.js @@ -0,0 +1,66 @@ +import '../../index.css'; +import { ClientOnly } from './client'; +import { headers } from 'next/headers'; +import { getChurchSlug } from '../../utils/index'; +import parseSlugToIdAndType from '@apollosproject/web-shared/utils/parseSlugToIdAndType'; +import Head from 'next/head'; + +export const dynamic = 'force-dynamic'; + +export async function generateMetadata({ params, searchParams }, parent) { + const id = searchParams?.id; + + if (!id) return parent; + + const route = headers().get('referer'); + + const churchSlug = getChurchSlug(route); + + const { type, randomId } = parseSlugToIdAndType(id) ?? []; + + // fetch data + const response = await fetch('https://cdn.apollos.app/', { + headers: { + 'content-type': 'application/json', + 'x-church': churchSlug, + }, + body: JSON.stringify({ + query: + 'query getItemMetadata($itemId:ID!){\n node(id:$itemId){\n ... on ContentItem {\n coverImage {\n sources {uri(refresh:true) }\n }\n title\n summary\n }\n }\n}', + variables: { itemId: `${type}:${randomId}` }, + operationName: 'getItemMetadata', + }), + method: 'POST', + }).then((res) => res.json()); + + const title = response?.data?.node?.title; + const description = response?.data?.node?.summary; + const image = response?.data?.node?.coverImage?.sources[0]?.uri; + + return { + title: title, + openGraph: { + title: title, + description: description, + images: [image], + }, + twitter: { + card: 'summary_large_image', + title: title, + description, + images: [image], // Must be an absolute URL + }, + }; +} + +export default function Page(props) { + const headersList = headers(); + return ( + <> + + + + + + ); +} diff --git a/micro-service/public/favicon.ico b/micro-service/src/app/favicon.ico similarity index 100% rename from micro-service/public/favicon.ico rename to micro-service/src/app/favicon.ico diff --git a/micro-service/public/icon.png b/micro-service/src/app/icon.png similarity index 100% rename from micro-service/public/icon.png rename to micro-service/src/app/icon.png diff --git a/micro-service/src/app/layout.tsx b/micro-service/src/app/layout.tsx new file mode 100644 index 00000000..bb61aa1c --- /dev/null +++ b/micro-service/src/app/layout.tsx @@ -0,0 +1,18 @@ +import type { Metadata } from 'next'; + +export const metadata: Metadata = { + title: 'Apollos Embeds', + description: 'Apollos Web Embeds', +}; + +export default function RootLayout({ children }: { children: React.ReactNode }) { + return ( + + + + +
{children}
+ + + ); +} diff --git a/micro-service/src/app/logo192.png b/micro-service/src/app/logo192.png new file mode 100644 index 00000000..48731d5c Binary files /dev/null and b/micro-service/src/app/logo192.png differ diff --git a/micro-service/src/app/logo512.png b/micro-service/src/app/logo512.png new file mode 100644 index 00000000..8aed8297 Binary files /dev/null and b/micro-service/src/app/logo512.png differ diff --git a/micro-service/src/app/manifest.json b/micro-service/src/app/manifest.json new file mode 100644 index 00000000..99e09276 --- /dev/null +++ b/micro-service/src/app/manifest.json @@ -0,0 +1,14 @@ +{ + "short_name": "Web Embeds", + "name": "Apollos Web Embeds", + "icons": [ + { + "src": "/favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + } + ], + "start_url": ".", + "display": "standalone", + "background_color": "#ffffff" +} diff --git a/micro-service/public/robots.txt b/micro-service/src/app/robots.txt similarity index 100% rename from micro-service/public/robots.txt rename to micro-service/src/app/robots.txt diff --git a/micro-service/src/index.js b/micro-service/src/index.js deleted file mode 100644 index d62e1afa..00000000 --- a/micro-service/src/index.js +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom/client'; - -import './index.css'; -import 'react-image-crop/dist/ReactCrop.css'; -import 'react-multi-carousel/lib/styles.css'; - -import App from './App'; -import reportWebVitals from './reportWebVitals'; - -const root = ReactDOM.createRoot(document.getElementById('root')); -root.render( - - - -); - -reportWebVitals(); diff --git a/micro-service/src/utils/index.js b/micro-service/src/utils/index.js new file mode 100644 index 00000000..6afe6c37 --- /dev/null +++ b/micro-service/src/utils/index.js @@ -0,0 +1,11 @@ +export const getChurchSlug = (host) => { + let subdomain = + process.env.NODE_ENV === 'production' + ? host.split('.').slice(0, -2).join('.') + : process.env.NEXT_PUBLIC_CHURCH_SLUG; + + if (process.env.NODE_ENV !== 'production' && !subdomain) { + subdomain = 'apollos-demo'; + } + return subdomain.replace(/-/g, '_'); +}; diff --git a/micro-service/tsconfig.json b/micro-service/tsconfig.json new file mode 100644 index 00000000..102d6577 --- /dev/null +++ b/micro-service/tsconfig.json @@ -0,0 +1,35 @@ +{ + "compilerOptions": { + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], + "allowJs": true, + "skipLibCheck": true, + "strict": false, + "noEmit": true, + "incremental": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "plugins": [ + { + "name": "next" + } + ] + }, + "include": [ + "next-env.d.ts", + "./dist/types/**/*.ts", + "**/*.ts", + "**/*.tsx", + ".next/types/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} diff --git a/micro-service/yarn.lock b/micro-service/yarn.lock index 0a9d920d..d6d95065 100644 --- a/micro-service/yarn.lock +++ b/micro-service/yarn.lock @@ -261,6 +261,10 @@ tslib "^2.3.0" zen-observable-ts "^1.2.5" +"@apollosproject/web-shared@link:../packages/packages/web-shared": + version "0.0.0" + uid "" + "@apollosproject/web-shared@link:../packages/web-shared": version "0.0.0" uid "" @@ -277,7 +281,7 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.6.tgz#15606a20341de59ba02cd2fcc5086fcbe73bf544" integrity sha512-29tfsWTq2Ftu7MXmimyC0C5FDZv5DYxOZkh3XD3+QW4V/BYuv/LyEsjj3c0hqedEaDt6DBfDvexMKU8YevdqFg== -"@babel/core@^7.1.0", "@babel/core@^7.11.1", "@babel/core@^7.12.3", "@babel/core@^7.16.0", "@babel/core@^7.22.5", "@babel/core@^7.7.2", "@babel/core@^7.8.0": +"@babel/core@^7.1.0", "@babel/core@^7.11.1", "@babel/core@^7.12.3", "@babel/core@^7.16.0", "@babel/core@^7.7.2", "@babel/core@^7.8.0": version "7.22.8" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.8.tgz#386470abe884302db9c82e8e5e87be9e46c86785" integrity sha512-75+KxFB4CZqYRXjx4NlR4J7yGvKumBuZTmV4NV6v09dVXXkuYVYLT68N6HCzLvfJ+fWCxQsntNzKwwIXL4bHnw== @@ -317,7 +321,7 @@ "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" -"@babel/helper-annotate-as-pure@^7.18.6", "@babel/helper-annotate-as-pure@^7.22.5": +"@babel/helper-annotate-as-pure@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882" integrity sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg== @@ -342,7 +346,7 @@ browserslist "^4.21.9" lru-cache "^5.1.1" -"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.21.0", "@babel/helper-create-class-features-plugin@^7.22.5", "@babel/helper-create-class-features-plugin@^7.22.6": +"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.22.5", "@babel/helper-create-class-features-plugin@^7.22.6": version "7.22.6" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.6.tgz#58564873c889a6fea05a538e23f9f6d201f10950" integrity sha512-iwdzgtSiBxF6ni6mzVnZCF3xt5qE6cEA0J7nFt8QOAWZ0zjCFceEgpn3vtb2V7WFR6QzP2jmIFOHMTRo7eNJjQ== @@ -601,16 +605,6 @@ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz#7844f9289546efa9febac2de4cfe358a050bd703" integrity sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w== -"@babel/plugin-proposal-private-property-in-object@^7.21.11": - version "7.21.11" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.11.tgz#69d597086b6760c4126525cfa154f34631ff272c" - integrity sha512-0QZ8qP/3RLDVBwBFoWAwCtgcDZJVwA5LUJRZU8x2YFfKNuFq161wK3cuGrALu5yiPu+vzwTAg/sMWVNeWeNyaw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-create-class-features-plugin" "^7.21.0" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - "@babel/plugin-proposal-unicode-property-regex@^7.4.4": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz#af613d2cd5e643643b65cded64207b15c85cb78e" @@ -1372,7 +1366,7 @@ core-js-pure "^3.30.2" regenerator-runtime "^0.13.11" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.16.3", "@babel/runtime@^7.20.7", "@babel/runtime@^7.21.0", "@babel/runtime@^7.22.5", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.16.3", "@babel/runtime@^7.20.7", "@babel/runtime@^7.21.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": version "7.22.6" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.6.tgz#57d64b9ae3cff1d67eb067ae117dac087f5bd438" integrity sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ== @@ -1980,6 +1974,56 @@ dependencies: "@lukeed/csprng" "^1.1.0" +"@next/env@14.1.4": + version "14.1.4" + resolved "https://registry.npmjs.org/@next/env/-/env-14.1.4.tgz#432e80651733fbd67230bf262aee28be65252674" + integrity sha512-e7X7bbn3Z6DWnDi75UWn+REgAbLEqxI8Tq2pkFOFAMpWAWApz/YCUhtWMWn410h8Q2fYiYL7Yg5OlxMOCfFjJQ== + +"@next/swc-darwin-arm64@14.1.4": + version "14.1.4" + resolved "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.1.4.tgz#a3bca0dc4393ac4cf3169bbf24df63441de66bb7" + integrity sha512-ubmUkbmW65nIAOmoxT1IROZdmmJMmdYvXIe8211send9ZYJu+SqxSnJM4TrPj9wmL6g9Atvj0S/2cFmMSS99jg== + +"@next/swc-darwin-x64@14.1.4": + version "14.1.4" + resolved "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.1.4.tgz#ba3683d4e2d30099f3f2864dd7349a4d9f440140" + integrity sha512-b0Xo1ELj3u7IkZWAKcJPJEhBop117U78l70nfoQGo4xUSvv0PJSTaV4U9xQBLvZlnjsYkc8RwQN1HoH/oQmLlQ== + +"@next/swc-linux-arm64-gnu@14.1.4": + version "14.1.4" + resolved "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.1.4.tgz#3519969293f16379954b7e196deb0c1eecbb2f8b" + integrity sha512-457G0hcLrdYA/u1O2XkRMsDKId5VKe3uKPvrKVOyuARa6nXrdhJOOYU9hkKKyQTMru1B8qEP78IAhf/1XnVqKA== + +"@next/swc-linux-arm64-musl@14.1.4": + version "14.1.4" + resolved "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.1.4.tgz#4bb3196bd402b3f84cf5373ff1021f547264d62f" + integrity sha512-l/kMG+z6MB+fKA9KdtyprkTQ1ihlJcBh66cf0HvqGP+rXBbOXX0dpJatjZbHeunvEHoBBS69GYQG5ry78JMy3g== + +"@next/swc-linux-x64-gnu@14.1.4": + version "14.1.4" + resolved "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.1.4.tgz#1b3372c98c83dcdab946cdb4ee06e068b8139ba3" + integrity sha512-BapIFZ3ZRnvQ1uWbmqEGJuPT9cgLwvKtxhK/L2t4QYO7l+/DxXuIGjvp1x8rvfa/x1FFSsipERZK70pewbtJtw== + +"@next/swc-linux-x64-musl@14.1.4": + version "14.1.4" + resolved "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.1.4.tgz#8459088bdc872648ff78f121db596f2533df5808" + integrity sha512-mqVxTwk4XuBl49qn2A5UmzFImoL1iLm0KQQwtdRJRKl21ylQwwGCxJtIYo2rbfkZHoSKlh/YgztY0qH3wG1xIg== + +"@next/swc-win32-arm64-msvc@14.1.4": + version "14.1.4" + resolved "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.1.4.tgz#84280a08c00cc3be24ddd3a12f4617b108e6dea6" + integrity sha512-xzxF4ErcumXjO2Pvg/wVGrtr9QQJLk3IyQX1ddAC/fi6/5jZCZ9xpuL9Tzc4KPWMFq8GGWFVDMshZOdHGdkvag== + +"@next/swc-win32-ia32-msvc@14.1.4": + version "14.1.4" + resolved "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.1.4.tgz#23ff7f4bd0a27177428669ef6fa5c3923c738031" + integrity sha512-WZiz8OdbkpRw6/IU/lredZWKKZopUMhcI2F+XiMAcPja0uZYdMTZQRoQ0WZcvinn9xZAidimE7tN9W5v9Yyfyw== + +"@next/swc-win32-x64-msvc@14.1.4": + version "14.1.4" + resolved "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.1.4.tgz#bccf5beccfde66d6c66fa4e2509118c796385eda" + integrity sha512-4Rto21sPfw555sZ/XNLqfxDUNeLhNYGO2dlPqsnuCg8N8a2a9u1ltqBOPQ4vj1Gf7eJC0W2hHG2eYUHuiXgY2w== + "@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1": version "5.1.1-v1" resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz#dbf733a965ca47b1973177dc0bb6c889edcfb129" @@ -2013,9 +2057,9 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@phosphor-icons/react@2.0.15": +"@phosphor-icons/react@^2.0.15": version "2.0.15" - resolved "https://registry.yarnpkg.com/@phosphor-icons/react/-/react-2.0.15.tgz#4d8e28484d45649f53a6cd75db161cf8b8379e1d" + resolved "https://registry.npmjs.org/@phosphor-icons/react/-/react-2.0.15.tgz#4d8e28484d45649f53a6cd75db161cf8b8379e1d" integrity sha512-PQKNcRrfERlC8gJGNz0su0i9xVmeubXSNxucPcbCLDd9u0cwJVTEyYK87muul/svf0UXFdL2Vl6bbeOhT1Mwow== "@pmmmwh/react-refresh-webpack-plugin@^0.5.3": @@ -3298,6 +3342,13 @@ "@svgr/plugin-svgo" "^5.5.0" loader-utils "^2.0.0" +"@swc/helpers@0.5.2": + version "0.5.2" + resolved "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.2.tgz#85ea0c76450b61ad7d10a37050289eded783c27d" + integrity sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw== + dependencies: + tslib "^2.4.0" + "@tanstack/react-virtual@^3.0.0-beta.60": version "3.1.3" resolved "https://registry.yarnpkg.com/@tanstack/react-virtual/-/react-virtual-3.1.3.tgz#4ef2a7dd819a7dd2b634d50cbd6ba498f06529ec" @@ -3599,6 +3650,11 @@ resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.3.tgz#3e51a17e291d01d17d3fc61422015a933af7a08f" integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA== +"@types/prop-types@*": + version "15.7.12" + resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz#12bb1e2be27293c1406acb6af1c3f3a1481d98c6" + integrity sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q== + "@types/q@^1.5.1": version "1.5.5" resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.5.tgz#75a2a8e7d8ab4b230414505d92335d1dcb53a6df" @@ -3614,6 +3670,14 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== +"@types/react@18.2.72": + version "18.2.72" + resolved "https://registry.npmjs.org/@types/react/-/react-18.2.72.tgz#3341a6d0746d1c7d8510810319323850c04bd6ed" + integrity sha512-/e7GWxGzXQF7OJAua7UAYqYi/4VpXEfbGtmYQcAQwP3SjjjAXfybTf/JK5S+SaetB/ChXl8Y2g1hCsj7jDXxcg== + dependencies: + "@types/prop-types" "*" + csstype "^3.0.2" + "@types/resolve@1.17.1": version "1.17.1" resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6" @@ -4416,17 +4480,6 @@ babel-plugin-macros@^3.1.0: cosmiconfig "^7.0.0" resolve "^1.19.0" -babel-plugin-module-resolver@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.0.tgz#2b7fc176bd55da25f516abf96015617b4f70fc73" - integrity sha512-g0u+/ChLSJ5+PzYwLwP8Rp8Rcfowz58TJNCe+L/ui4rpzE/mg//JVX0EWBUYoxaextqnwuGHzfGp2hh0PPV25Q== - dependencies: - find-babel-config "^2.0.0" - glob "^8.0.3" - pkg-up "^3.1.0" - reselect "^4.1.7" - resolve "^1.22.1" - babel-plugin-named-asset-import@^0.3.8: version "0.3.8" resolved "https://registry.yarnpkg.com/babel-plugin-named-asset-import/-/babel-plugin-named-asset-import-0.3.8.tgz#6b7fa43c59229685368683c28bc9734f24524cc2" @@ -4456,7 +4509,7 @@ babel-plugin-polyfill-regenerator@^0.5.1: dependencies: "@babel/helper-define-polyfill-provider" "^0.4.1" -"babel-plugin-styled-components@>= 1.12.0", babel-plugin-styled-components@^2.1.4: +"babel-plugin-styled-components@>= 1.12.0": version "2.1.4" resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-2.1.4.tgz#9a1f37c7f32ef927b4b008b529feb4a2c82b1092" integrity sha512-Xgp9g+A/cG47sUyRwwYxGM4bR/jDRg5N6it/8+HxCnbT5XNKSKDT9xm4oag/osgqjC2It/vH0yXsomOG6k558g== @@ -4652,6 +4705,13 @@ builtin-modules@^3.1.0: resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== +busboy@1.6.0: + version "1.6.0" + resolved "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" + integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== + dependencies: + streamsearch "^1.1.0" + bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" @@ -4718,6 +4778,11 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001464, can resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001514.tgz#e2a7e184a23affc9367b7c8d734e7ec4628c1309" integrity sha512-ENcIpYBmwAAOm/V2cXgM7rZUrKKaqisZl4ZAI520FIkqGXUxJjmaIssbRW5HVVR5tyV6ygTLIm15aU8LUmQSaQ== +caniuse-lite@^1.0.30001579: + version "1.0.30001600" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001600.tgz#93a3ee17a35aa6a9f0c6ef1b2ab49507d1ab9079" + integrity sha512-+2S9/2JFhYmYaDpZvo0lKkfvuKIglrx68MwOBqMGHhQsNkLjB5xtc/TGoEPs+MxjSyN/72qer2g97nzR641mOQ== + case-sensitive-paths-webpack-plugin@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.4.0.tgz#db64066c6422eed2e08cc14b986ca43796dbc6d4" @@ -4805,7 +4870,7 @@ clean-css@^5.2.2: dependencies: source-map "~0.6.0" -client-only@^0.0.1: +client-only@0.0.1, client-only@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1" integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA== @@ -6225,14 +6290,6 @@ finalhandler@1.2.0: statuses "2.0.1" unpipe "~1.0.0" -find-babel-config@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/find-babel-config/-/find-babel-config-2.0.0.tgz#a8216f825415a839d0f23f4d18338a1cc966f701" - integrity sha512-dOKT7jvF3hGzlW60Gc3ONox/0rRZ/tz7WCil0bqA1In/3I8f1BctpXahRnEKDySZqci7u+dqq93sZST9fOJpFw== - dependencies: - json5 "^2.1.1" - path-exists "^4.0.0" - find-cache-dir@^3.3.1: version "3.3.2" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" @@ -6473,17 +6530,6 @@ glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.3: - version "8.1.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" - integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - global-modules@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" @@ -6538,7 +6584,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -7836,7 +7882,7 @@ json5@^1.0.2: dependencies: minimist "^1.2.0" -json5@^2.1.1, json5@^2.1.2, json5@^2.2.0, json5@^2.2.2: +json5@^2.1.2, json5@^2.2.0, json5@^2.2.2: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== @@ -8252,6 +8298,29 @@ new-date@^1.0.3: dependencies: "@segment/isodate" "1.0.3" +next@^14.1.4: + version "14.1.4" + resolved "https://registry.npmjs.org/next/-/next-14.1.4.tgz#203310f7310578563fd5c961f0db4729ce7a502d" + integrity sha512-1WTaXeSrUwlz/XcnhGTY7+8eiaFvdet5z9u3V2jb+Ek1vFo0VhHKSAIJvDWfQpttWjnyw14kBeq28TPq7bTeEQ== + dependencies: + "@next/env" "14.1.4" + "@swc/helpers" "0.5.2" + busboy "1.6.0" + caniuse-lite "^1.0.30001579" + graceful-fs "^4.2.11" + postcss "8.4.31" + styled-jsx "5.1.1" + optionalDependencies: + "@next/swc-darwin-arm64" "14.1.4" + "@next/swc-darwin-x64" "14.1.4" + "@next/swc-linux-arm64-gnu" "14.1.4" + "@next/swc-linux-arm64-musl" "14.1.4" + "@next/swc-linux-x64-gnu" "14.1.4" + "@next/swc-linux-x64-musl" "14.1.4" + "@next/swc-win32-arm64-msvc" "14.1.4" + "@next/swc-win32-ia32-msvc" "14.1.4" + "@next/swc-win32-x64-msvc" "14.1.4" + no-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" @@ -9188,6 +9257,15 @@ postcss-value-parser@^4.0.0, postcss-value-parser@^4.0.2, postcss-value-parser@^ resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== +postcss@8.4.31: + version "8.4.31" + resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz#92b451050a9f914da6755af352bdc0192508656d" + integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ== + dependencies: + nanoid "^3.3.6" + picocolors "^1.0.0" + source-map-js "^1.0.2" + postcss@^7.0.32, postcss@^7.0.35, postcss@^7.0.39: version "7.0.39" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.39.tgz#9624375d965630e2e1f2c02a935c82a59cb48309" @@ -9768,11 +9846,6 @@ requires-port@^1.0.0: resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== -reselect@^4.1.7: - version "4.1.8" - resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.1.8.tgz#3f5dc671ea168dccdeb3e141236f69f02eaec524" - integrity sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ== - resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" @@ -10256,6 +10329,11 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== +streamsearch@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" + integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== + string-length@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" @@ -10417,6 +10495,13 @@ styled-components@^5.3.6: shallowequal "^1.1.0" supports-color "^5.5.0" +styled-jsx@5.1.1: + version "5.1.1" + resolved "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz#839a1c3aaacc4e735fed0781b8619ea5d0009d1f" + integrity sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw== + dependencies: + client-only "0.0.1" + styled-system@^5.1.5: version "5.1.5" resolved "https://registry.yarnpkg.com/styled-system/-/styled-system-5.1.5.tgz#e362d73e1dbb5641a2fd749a6eba1263dc85075e" @@ -10778,7 +10863,7 @@ tslib@^1.8.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.4.1: +tslib@^2.0.0, tslib@^2.4.0, tslib@^2.4.1: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== @@ -10846,6 +10931,11 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" +typescript@5.4.3: + version "5.4.3" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz#5c6fedd4c87bee01cd7a528a30145521f8e0feff" + integrity sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg== + unbox-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" diff --git a/packages/web-shared/components/ContentSeriesSingle.js b/packages/web-shared/components/ContentSeriesSingle.js index d7038498..a6dab5ed 100644 --- a/packages/web-shared/components/ContentSeriesSingle.js +++ b/packages/web-shared/components/ContentSeriesSingle.js @@ -94,7 +94,6 @@ function ContentSeriesSingle(props = {}) { return ( <> - {title} {/* Standard metadata tags */} {title} diff --git a/packages/web-shared/components/ContentSingle.js b/packages/web-shared/components/ContentSingle.js index cbff8b26..dfbb59ce 100644 --- a/packages/web-shared/components/ContentSingle.js +++ b/packages/web-shared/components/ContentSingle.js @@ -194,7 +194,6 @@ function ContentSingle(props = {}) { <> {/* TODO: Max width set to 750px due to low resolution pictures. Can be increased as higher quality images are used */} - {title} {/* Standard metadata tags */} {title} diff --git a/packages/web-shared/components/LivestreamSingle.js b/packages/web-shared/components/LivestreamSingle.js index 79a072ca..947bae12 100644 --- a/packages/web-shared/components/LivestreamSingle.js +++ b/packages/web-shared/components/LivestreamSingle.js @@ -95,7 +95,6 @@ function LivestreamSingle(props = {}) { return ( <> - {title} {/* Standard metadata tags */} {title} diff --git a/packages/web-shared/components/Logo/Logo.js b/packages/web-shared/components/Logo/Logo.js index 7eaab3c3..f9896801 100644 --- a/packages/web-shared/components/Logo/Logo.js +++ b/packages/web-shared/components/Logo/Logo.js @@ -7,15 +7,8 @@ import Styled from './Logo.styles'; import { Box, systemPropTypes } from '../../ui-kit'; function Logo({ fill, size, padding, theme, source, ...rest }) { - let themeData = ''; - try { - themeData = JSON.parse(theme); - } catch (error) { - console.error('Error parsing JSON'); - } - return ( - + ); diff --git a/packages/web-shared/components/index.js b/packages/web-shared/components/index.js index a328db52..dd7b231e 100644 --- a/packages/web-shared/components/index.js +++ b/packages/web-shared/components/index.js @@ -11,6 +11,7 @@ import Modal from './Modal'; import Profile from './Profile'; import Searchbar from './Searchbar'; import VideoPlayer from './VideoPlayer'; +import Wordmark from './Wordmark'; export { AuthManager, @@ -26,4 +27,5 @@ export { Profile, Searchbar, VideoPlayer, + Wordmark, }; diff --git a/packages/web-shared/embeds/FeatureFeed.js b/packages/web-shared/embeds/FeatureFeed.js index c9586a66..09128f04 100644 --- a/packages/web-shared/embeds/FeatureFeed.js +++ b/packages/web-shared/embeds/FeatureFeed.js @@ -19,6 +19,7 @@ import { getComponentFromType } from '../utils/getContentFromURL'; function RenderFeatures(props) { const [searchParams] = useSearchParams(); const _id = searchParams.get('id'); + const { type, randomId } = parseSlugToIdAndType(_id) ?? {}; const Component = getComponentFromType({ type, id: randomId }); @@ -48,7 +49,6 @@ const FeatureFeed = (props) => { const analytics = useAnalytics(); useEffect(() => { - console.log(props); analytics.track('ViewFeatureFeed', { featureFeedId: props.featureFeed, }); diff --git a/packages/web-shared/package.json b/packages/web-shared/package.json index 06cf3142..04ebc686 100644 --- a/packages/web-shared/package.json +++ b/packages/web-shared/package.json @@ -5,15 +5,52 @@ "license": "MIT", "private": true, "dependencies": { + "@apollo/client": "^3.9.9", "@babel/preset-react": "^7.22.5", "@headlessui/react": "^1.7.18", + "@phosphor-icons/react": "^2.0.15", + "@segment/analytics-next": "^1.66.0", + "amplitude-js": "^8.21.9", + "apollo-upload-client": "^17.0.0", + "base-64": "^1.0.0", + "graphql": "^16.8.1", "polished": "^4.1.2", - "react-helmet": "^6.1.0" + "react-helmet": "^6.1.0", + "@algolia/autocomplete-js": "^1.9.2", + "@algolia/autocomplete-plugin-query-suggestions": "^1.9.2", + "@algolia/autocomplete-plugin-recent-searches": "^1.9.2", + "@algolia/autocomplete-preset-algolia": "^1.9.2", + "@algolia/autocomplete-theme-classic": "^1.9.2", + "@craco/craco": "^7.0.0", + "@sentry/react": "^7.40.0", + "@styled-system/theme-get": "^5.1.2", + "@testing-library/jest-dom": "^5.11.4", + "@testing-library/react": "^11.1.0", + "@testing-library/user-event": "^12.1.10", + "algoliasearch": "^4.17.0", + "apollo3-cache-persist": "^0.14.1", + "autoprefixer": "^9.8.6", + "color": "^4.2.3", + "date-fns": "^2.29.3", + "dompurify": "^2.4.3", + "lodash": "^4.17.21", + "moment": "^2.29.1", + "postcss": "^7.0.39", + "prop-types": "^15.8.1", + "react-image-crop": "^10.0.11", + "react-instantsearch-dom": "^6.40.0", + "react-instantsearch-hooks-web": "^6.44.0", + "react-multi-carousel": "^2.8.2", + "react-player": "^2.11.2", + "react-router-dom": "^6.7.0", + "react-transition-group": "^4.4.5", + "styled-components": "^5.3.6", + "styled-system": "^5.1.5", + "tldts": "^6.0.20", + "uuid": "^9.0.0", + "web-vitals": "^0.2.4" }, "peerDependencies": { - "@apollo/client": "*", - "@segment/analytics-next": "*", - "amplitude-js": "*", "prop-types": "*", "react": "*", "react-transition-group": "*", diff --git a/packages/web-shared/providers/AppProvider.js b/packages/web-shared/providers/AppProvider.js index 46dd69ca..87ea7cd1 100644 --- a/packages/web-shared/providers/AppProvider.js +++ b/packages/web-shared/providers/AppProvider.js @@ -19,6 +19,7 @@ function AppProvider(props = {}) { }; initialize(); }, [props.church]); + if (!client) { return null; } diff --git a/packages/web-shared/providers/index.js b/packages/web-shared/providers/index.js index 74341a4e..f842666d 100644 --- a/packages/web-shared/providers/index.js +++ b/packages/web-shared/providers/index.js @@ -6,6 +6,7 @@ import ContentItemProvider from './ContentItemProvider'; import FeatureFeedProvider from './FeatureFeedProvider'; import ModalProvider from './ModalProvider'; import SearchProvider from './SearchProvider'; +import { createBrowserRouter, RouterProvider } from 'react-router-dom'; export { AppProvider, @@ -16,4 +17,6 @@ export { FeatureFeedProvider, ModalProvider, SearchProvider, + createBrowserRouter, + RouterProvider, }; diff --git a/packages/web-shared/ui-kit/Button/Button.js b/packages/web-shared/ui-kit/Button/Button.js index c6775ea2..7c582139 100644 --- a/packages/web-shared/ui-kit/Button/Button.js +++ b/packages/web-shared/ui-kit/Button/Button.js @@ -4,16 +4,23 @@ import PropTypes from 'prop-types'; import { systemPropTypes } from '../_lib/system'; import Styled from './Button.styles'; -const Button = ({ onClick, backgroundColor, ...props }) => { +// eslint-disable-next-line no-console +const Button = ({ + onClick = () => console.log('Please attach a method to this component'), + size = 'large', + backgroundColor, + ...props +}) => { return ( - + {props.title} {props?.icon} @@ -30,11 +37,4 @@ Button.propTypes = { onClick: PropTypes.func, }; -Button.defaultProps = { - size: 'large', - // eslint-disable-next-line no-console - onClick: () => console.log('Please attach a method to this component'), - icon: null, -}; - export default Button; diff --git a/packages/web-shared/ui-kit/Loader/Loader.js b/packages/web-shared/ui-kit/Loader/Loader.js index 00e10b68..95d7630e 100644 --- a/packages/web-shared/ui-kit/Loader/Loader.js +++ b/packages/web-shared/ui-kit/Loader/Loader.js @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import { systemPropTypes } from '../_lib/system'; import Styled from './Loader.styles'; -function Loader(props = {}) { +function Loader({ text = null, ...props }) { return ( @@ -50,10 +50,6 @@ Loader.propTypes = { text: PropTypes.string, }; -Loader.defaultProps = { - text: null, -}; - Loader.SVG = SVG; export default Loader; diff --git a/packages/web-shared/ui-kit/ThemeProvider/ThemeProvider.js b/packages/web-shared/ui-kit/ThemeProvider/ThemeProvider.js index cb81fa77..9c213de2 100644 --- a/packages/web-shared/ui-kit/ThemeProvider/ThemeProvider.js +++ b/packages/web-shared/ui-kit/ThemeProvider/ThemeProvider.js @@ -5,7 +5,7 @@ import defaultTheme from '../_config/theme'; import { useCurrentChurch } from '../../hooks'; import { useSearch, set } from '../../providers/SearchProvider'; -function ThemeProvider(props) { +function ThemeProvider({ theme = defaultTheme, ...props }) { const [_colorScheme, setColorScheme] = useState('light'); const [_colorTheme, setColorTheme] = useState({ ...defaultTheme, @@ -49,38 +49,24 @@ function ThemeProvider(props) { // only these three custom colors are currently supported base: { ...defaultTheme.colors.light.base, - primary: - customTheme?.colors?.primary || - defaultTheme.colors.light.base.primary, - secondary: - customTheme?.colors?.secondary || - defaultTheme.colors.light.base.secondary, - tertiary: - customTheme?.colors?.tertiary || - defaultTheme.colors.light.base.tertiary, + primary: customTheme?.colors?.primary || defaultTheme.colors.light.base.primary, + secondary: customTheme?.colors?.secondary || defaultTheme.colors.light.base.secondary, + tertiary: customTheme?.colors?.tertiary || defaultTheme.colors.light.base.tertiary, }, text: { ...defaultTheme.colors.light.text, - action: - customTheme?.colors?.secondary || - defaultTheme.colors.light.text.action, + action: customTheme?.colors?.secondary || defaultTheme.colors.light.text.action, }, }, }); } }, [currentChurch]); - return ( - {props.children} - ); + return {props.children}; } ThemeProvider.propTypes = { children: PropTypes.node.isRequired, }; -ThemeProvider.defaultProps = { - theme: defaultTheme, -}; - export default withTheme(ThemeProvider); diff --git a/packages/web-shared/ui-kit/index.js b/packages/web-shared/ui-kit/index.js index cfd0c3b8..5374cf20 100644 --- a/packages/web-shared/ui-kit/index.js +++ b/packages/web-shared/ui-kit/index.js @@ -1,3 +1,4 @@ +import styled, { withTheme, css } from 'styled-components'; import theme from './_config/theme'; import { system, systemPropTypes } from './_lib/system'; @@ -83,4 +84,8 @@ export { systemPropTypes, utils, // ==================== + // Reexport to ensure that styled-components is using the same instance as the consuming app + styled, + withTheme, + css, }; diff --git a/web-embeds/public/index.html b/web-embeds/public/index.html index 12792e21..06f7556a 100644 --- a/web-embeds/public/index.html +++ b/web-embeds/public/index.html @@ -6,7 +6,6 @@ - - Apollos Web Embeds