Skip to content

Commit

Permalink
Merge pull request #541 from dappforce/revert
Browse files Browse the repository at this point in the history
Revert "Merge pull request #540 from dappforce/deploy/path"
  • Loading branch information
teodorus-nathaniel authored Feb 15, 2024
2 parents 6a14b36 + 53a6d8b commit 92cb889
Show file tree
Hide file tree
Showing 26 changed files with 97 additions and 266 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ jobs:
file: docker/mainnet-Dockerfile
push: true
build-args: |
GH_NEXTAUTH_URL=https://grill.so/c
GH_NEXT_PUBLIC_BASE_PATH=/c
GH_NEXTAUTH_URL=https://grill.so
GH_NEXT_PUBLIC_SUBSTRATE_URL=https://para.subsocial.network
GH_NEXT_PUBLIC_SUBSTRATE_WSS=wss://para.subsocial.network
GH_NEXT_PUBLIC_DATAHUB_QUERY_URL=https://sub-data-hub.subsocial.network/graphql
Expand Down
1 change: 0 additions & 1 deletion ci.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ NEXT_PUBLIC_APP_ID='$GH_NEXT_PUBLIC_APP_ID'
SERVER_MNEMONIC='$GH_SERVER_MNEMONIC'
SERVER_DISCUSSION_CREATOR_MNEMONIC='$GH_SERVER_DISCUSSION_CREATOR_MNEMONIC'
NEXT_PUBLIC_SPACE_IDS='$GH_NEXT_PUBLIC_SPACE_IDS'
NEXT_PUBLIC_BASE_PATH='$GH_NEXT_PUBLIC_BASE_PATH'
MODERATION_URL='$GH_MODERATION_URL'
MODERATION_TOKEN='$GH_MODERATION_TOKEN'
NEXT_PUBLIC_NOTIFICATION_APP_ID='$GH_NEXT_PUBLIC_NOTIFICATION_APP_ID'
Expand Down
4 changes: 0 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ ARG GH_DATAHUB_QUEUE_URL
ARG GH_NEXT_PUBLIC_NOTIFICATION_APP_ID
ARG GH_NEXT_PUBLIC_OFFCHAIN_POSTING_HUBS
ARG GH_NEXT_PUBLIC_SPACE_IDS
ARG GH_NEXT_PUBLIC_BASE_PATH
ARG GH_NEXT_PUBLIC_AMP_ID
ARG GH_NEXT_PUBLIC_SQUID_URL
ARG GH_NEXT_PUBLIC_COMMUNITY_HUB_ID
Expand All @@ -28,7 +27,6 @@ ARG GH_NEXT_PUBLIC_FIREBASE_APP_ID

ENV NEXTAUTH_URL=${GH_NEXTAUTH_URL} \
NEXT_PUBLIC_SPACE_IDS=${GH_NEXT_PUBLIC_SPACE_IDS} \
NEXT_PUBLIC_BASE_PATH=${GH_NEXT_PUBLIC_BASE_PATH} \
NEXT_PUBLIC_SUBSTRATE_WSS=${GH_NEXT_PUBLIC_SUBSTRATE_WSS} \
NEXT_PUBLIC_SUBSTRATE_URL=${GH_NEXT_PUBLIC_SUBSTRATE_URL} \
NEXT_PUBLIC_DATAHUB_QUERY_URL=${GH_NEXT_PUBLIC_DATAHUB_QUERY_URL} \
Expand Down Expand Up @@ -75,7 +73,6 @@ ARG GH_DATAHUB_QUEUE_URL
ARG GH_NEXT_PUBLIC_NOTIFICATION_APP_ID
ARG GH_NEXT_PUBLIC_OFFCHAIN_POSTING_HUBS
ARG GH_NEXT_PUBLIC_SPACE_IDS
ARG GH_NEXT_PUBLIC_BASE_PATH
ARG GH_NEXT_PUBLIC_AMP_ID
ARG GH_NEXT_PUBLIC_SQUID_URL
ARG GH_NEXT_PUBLIC_COMMUNITY_HUB_ID
Expand All @@ -94,7 +91,6 @@ ARG GH_NEXT_PUBLIC_FIREBASE_APP_ID

ENV NEXTAUTH_URL=${GH_NEXTAUTH_URL} \
NEXT_PUBLIC_SPACE_IDS=${GH_NEXT_PUBLIC_SPACE_IDS} \
NEXT_PUBLIC_BASE_PATH=${GH_NEXT_PUBLIC_BASE_PATH} \
NEXT_PUBLIC_SUBSTRATE_WSS=${GH_NEXT_PUBLIC_SUBSTRATE_WSS} \
NEXT_PUBLIC_SUBSTRATE_URL=${GH_NEXT_PUBLIC_SUBSTRATE_URL} \
NEXT_PUBLIC_DATAHUB_QUERY_URL=${GH_NEXT_PUBLIC_DATAHUB_QUERY_URL} \
Expand Down
4 changes: 0 additions & 4 deletions docker/mainnet-Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ ARG GH_DATAHUB_QUEUE_URL
ARG GH_NEXT_PUBLIC_NOTIFICATION_APP_ID
ARG GH_NEXT_PUBLIC_OFFCHAIN_POSTING_HUBS
ARG GH_NEXT_PUBLIC_SPACE_IDS
ARG GH_NEXT_PUBLIC_BASE_PATH
ARG GH_NEXT_PUBLIC_AMP_ID
ARG GH_NEXT_PUBLIC_SQUID_URL
ARG GH_NEXT_PUBLIC_COMMUNITY_HUB_ID
Expand All @@ -18,7 +17,6 @@ ARG GH_NEXT_PUBLIC_APP_ID

ENV NEXTAUTH_URL=${GH_NEXTAUTH_URL} \
NEXT_PUBLIC_SPACE_IDS=${GH_NEXT_PUBLIC_SPACE_IDS} \
NEXT_PUBLIC_BASE_PATH=${GH_NEXT_PUBLIC_BASE_PATH} \
NEXT_PUBLIC_SUBSTRATE_WSS=${GH_NEXT_PUBLIC_SUBSTRATE_WSS} \
NEXT_PUBLIC_SUBSTRATE_URL=${GH_NEXT_PUBLIC_SUBSTRATE_URL} \
NEXT_PUBLIC_DATAHUB_QUERY_URL=${GH_NEXT_PUBLIC_DATAHUB_QUERY_URL} \
Expand Down Expand Up @@ -56,7 +54,6 @@ ARG GH_DATAHUB_QUEUE_URL
ARG GH_NEXT_PUBLIC_NOTIFICATION_APP_ID
ARG GH_NEXT_PUBLIC_OFFCHAIN_POSTING_HUBS
ARG GH_NEXT_PUBLIC_SPACE_IDS
ARG GH_NEXT_PUBLIC_BASE_PATH
ARG GH_NEXT_PUBLIC_AMP_ID
ARG GH_NEXT_PUBLIC_SQUID_URL
ARG GH_NEXT_PUBLIC_COMMUNITY_HUB_ID
Expand All @@ -67,7 +64,6 @@ ARG GH_NEXT_PUBLIC_APP_ID

ENV NEXTAUTH_URL=${GH_NEXTAUTH_URL} \
NEXT_PUBLIC_SPACE_IDS=${GH_NEXT_PUBLIC_SPACE_IDS} \
NEXT_PUBLIC_BASE_PATH=${GH_NEXT_PUBLIC_BASE_PATH} \
NEXT_PUBLIC_SUBSTRATE_WSS=${GH_NEXT_PUBLIC_SUBSTRATE_WSS} \
NEXT_PUBLIC_SUBSTRATE_URL=${GH_NEXT_PUBLIC_SUBSTRATE_URL} \
NEXT_PUBLIC_DATAHUB_QUERY_URL=${GH_NEXT_PUBLIC_DATAHUB_QUERY_URL} \
Expand Down
4 changes: 0 additions & 4 deletions docker/storybook-Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ ARG GH_USER_ID_SALT
ARG GH_CRUST_IPFS_AUTH
ARG GH_NEXT_PUBLIC_APP_ID
ARG GH_NEXT_PUBLIC_SPACE_IDS
ARG GH_NEXT_PUBLIC_BASE_PATH
ARG GH_MODERATION_URL
ARG GH_MODERATION_TOKEN
ARG GH_NEXT_PUBLIC_NOTIFICATION_APP_ID
Expand Down Expand Up @@ -38,7 +37,6 @@ ARG GH_NEXTAUTH_URL

ENV NEXT_PUBLIC_APP_ID=${GH_NEXT_PUBLIC_APP_ID} \
NEXT_PUBLIC_SPACE_IDS=${GH_NEXT_PUBLIC_SPACE_IDS} \
NEXT_PUBLIC_BASE_PATH=${GH_NEXT_PUBLIC_BASE_PATH} \
MODERATION_URL=${GH_MODERATION_URL} \
MODERATION_TOKEN=${GH_MODERATION_TOKEN} \
NEXT_PUBLIC_NOTIFICATION_APP_ID=${GH_NEXT_PUBLIC_NOTIFICATION_APP_ID} \
Expand Down Expand Up @@ -92,7 +90,6 @@ ARG GH_USER_ID_SALT
ARG GH_CRUST_IPFS_AUTH
ARG GH_NEXT_PUBLIC_APP_ID
ARG GH_NEXT_PUBLIC_SPACE_IDS
ARG GH_NEXT_PUBLIC_BASE_PATH
ARG GH_MODERATION_URL
ARG GH_MODERATION_TOKEN
ARG GH_NEXT_PUBLIC_NOTIFICATION_APP_ID
Expand Down Expand Up @@ -124,7 +121,6 @@ ARG GH_NEXTAUTH_URL

ENV NEXT_PUBLIC_APP_ID=${GH_NEXT_PUBLIC_APP_ID} \
NEXT_PUBLIC_SPACE_IDS=${GH_NEXT_PUBLIC_SPACE_IDS} \
NEXT_PUBLIC_BASE_PATH=${GH_NEXT_PUBLIC_BASE_PATH} \
MODERATION_URL=${GH_MODERATION_URL} \
MODERATION_TOKEN=${GH_MODERATION_TOKEN} \
NEXT_PUBLIC_NOTIFICATION_APP_ID=${GH_NEXT_PUBLIC_NOTIFICATION_APP_ID} \
Expand Down
1 change: 0 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const withPWA = require('next-pwa')({

/** @type {import('next').NextConfig} */
const nextConfig = {
basePath: process.env.NEXT_PUBLIC_BASE_PATH || undefined,
reactStrictMode: true,
experimental: {
scrollRestoration: true,
Expand Down
49 changes: 0 additions & 49 deletions public/manifestc.json

This file was deleted.

7 changes: 1 addition & 6 deletions src/components/PWAInstall.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { env } from '@/env.mjs'
import useIsInIframe from '@/hooks/useIsInIframe'
import '@khmyznikov/pwa-install'
import { createPortal } from 'react-dom'
import urlJoin from 'url-join'

declare global {
namespace JSX {
Expand All @@ -19,10 +17,7 @@ export default function PWAInstall() {
return createPortal(
<pwa-install
id='pwa-install'
manifest-url={urlJoin(
env.NEXT_PUBLIC_BASE_PATH,
`/manifest${env.NEXT_PUBLIC_BASE_PATH.substring(1)}.json`
)}
manifest-url='/manifest.json'
manual-chrome='true'
manual-apple='true'
></pwa-install>,
Expand Down
6 changes: 3 additions & 3 deletions src/components/extensions/secret-box/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DecryptRespose } from '@/pages/api/promo-message/decrypt'
import { EncryptRespose } from '@/pages/api/promo-message/encrypt'
import { apiInstance } from '@/services/api/utils'
import mutationWrapper from '@/subsocial-query/base'
import axios from 'axios'

export const canUsePromoExtensionAccounts = [
'3tFT2KDqmyfBU7hoGTNSJ8j2aBXQvvSQS5ncBdgtMM6SBQBS',
Expand All @@ -16,7 +16,7 @@ type EncodeSecretBoxParams = {
}

async function encodeSecretBox({ message, address }: EncodeSecretBoxParams) {
const res = await apiInstance.post('/api/promo-message/encrypt', {
const res = await axios.post('/api/promo-message/encrypt', {
message,
address,
})
Expand All @@ -37,7 +37,7 @@ async function decodeSecretBox({
encryptedMessage,
nonce,
}: DecodeSecretBoxParams) {
const res = await apiInstance.post('/api/promo-message/decrypt', {
const res = await axios.post('/api/promo-message/decrypt', {
encryptedMessage,
nonce,
})
Expand Down
2 changes: 0 additions & 2 deletions src/env.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export const env = createEnv({
.string()
.default('')
.transform((val) => val.split(',').filter(Boolean)),
NEXT_PUBLIC_BASE_PATH: z.string().default(''),
NEXT_PUBLIC_OFFCHAIN_POSTING_HUBS: z
.string()
.default('')
Expand Down Expand Up @@ -64,7 +63,6 @@ export const env = createEnv({
},
experimental__runtimeEnv: {
NEXT_PUBLIC_APP_ID: process.env.NEXT_PUBLIC_APP_ID,
NEXT_PUBLIC_BASE_PATH: process.env.NEXT_PUBLIC_BASE_PATH,
NEXT_PUBLIC_MAIN_SPACE_ID: process.env.NEXT_PUBLIC_SPACE_IDS,
NEXT_PUBLIC_SPACE_IDS: process.env.NEXT_PUBLIC_SPACE_IDS,
NEXT_PUBLIC_OFFCHAIN_POSTING_HUBS:
Expand Down
6 changes: 1 addition & 5 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import BadgeManager from '@/components/BadgeManager'
import ErrorBoundary from '@/components/ErrorBoundary'
import HeadConfig, { HeadConfigProps } from '@/components/HeadConfig'
import { env } from '@/env.mjs'
import useIsInIframe from '@/hooks/useIsInIframe'
import useNetworkStatus from '@/hooks/useNetworkStatus'
import {
Expand Down Expand Up @@ -54,10 +53,7 @@ export default function App(props: AppProps<AppCommonProps>) {
: ''

return (
<SessionProvider
basePath={env.NEXT_PUBLIC_BASE_PATH || undefined}
session={props.pageProps.session}
>
<SessionProvider session={props.pageProps.session}>
<ConfigProvider>
<style jsx global>{`
${isInIframe
Expand Down
Loading

0 comments on commit 92cb889

Please sign in to comment.