Skip to content

Commit

Permalink
Merge branch 'main' into main-fix-search-bar
Browse files Browse the repository at this point in the history
  • Loading branch information
rajitharussel authored Feb 9, 2024
2 parents 71e49a0 + 4ab26a2 commit 0002e8d
Show file tree
Hide file tree
Showing 111 changed files with 6,545 additions and 3,354 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# default owner
* @jordanwade @calebpanza

27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Lint Web Embeds

on:
push:
paths:
- 'web-embeds/**'
pull_request:
paths:
- 'web-embeds/**'

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: '16'

- name: Install Dependencies
run: cd web-embeds && yarn install

- name: Run Lint
run: cd web-embeds && yarn lint
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"github.vscode-pull-request-github",
"eamodio.gitlens",
"esbenp.prettier-vscode",
"meganrogge.template-string-converter"
]
}
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}/app"
}
]
}
20 changes: 20 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"prettier.trailingComma": "es5",
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 2,
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.fixAll.prettier": "explicit"
},
"prettier.requireConfig": true
}
2 changes: 2 additions & 0 deletions micro-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
"@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",
"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",
Expand Down
Binary file modified micro-service/public/favicon.ico
Binary file not shown.
39 changes: 21 additions & 18 deletions micro-service/public/index.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link id="favicon" rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Web site created using create-react-app" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--

<head>
<meta charset="utf-8" />
<link id="favicon" rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Web embed created using The Apollos Project" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Expand All @@ -21,13 +22,14 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<title>Apollos Web Embeds</title>
</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>

<div id="root"></div>
<!--
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expand All @@ -37,5 +39,6 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
</body>

</html>
6 changes: 5 additions & 1 deletion micro-service/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ function ChurchLogo(props) {
}

function App(props) {
const subdomain =
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');
Expand Down
Loading

0 comments on commit 0002e8d

Please sign in to comment.