Skip to content

Instantly share code, notes, and snippets.

View jthoms1's full-sized avatar
💻
Writing Code

Josh Thomas jthoms1

💻
Writing Code
View GitHub Profile
@jthoms1
jthoms1 / index.ts
Last active September 28, 2021 16:43
import ShopAPI from './ShopAPIPlugin';
import Portals from '@ionic/portals';
const App: React.FC<InitialContext> = () => {
const [sessionInfo, setSession] = useState(null);
const [startingRoute, setInitialRoute] = useState(null);
useEffect(() => {
const [context, sessionInfo] = await Promise.all([
Portals.getInitialContext(),
# Instructions on how to download an App Bundle from AppFlow
#
#
# Setup auth first: https://ionic.io/docs/appflow/cli/overview#authentication
#
# Environment variables
#
# APP_ID (IE 186b544f)
# CHANNEL (IE production)
# PORTAL_NAME (IE checkout)
# Type a script or drag a script file from your workspace to insert # Type a script or drag a script file from your workspace to insert its path.
# SRCROOT
# TARGET_NAME
# BUILT_PRODUCTS_DIR
APP_NAME="shopwebapp"
EMBEDDED_DIR="${BUILT_PRODUCTS_DIR}/${TARGET_NAME}.app/portals"
EMBEDDED_APP="${SRCROOT}/../../web/build"
ZIP_FILE="${APP_NAME}.zip"
mkdir "${EMBEDDED_DIR}"
@jthoms1
jthoms1 / Why_not.tsx
Last active October 12, 2022 16:34
Why_not
import { GoogleMap } from '@capacitor/google-maps';
const MyMap: React.FC = () => {
return (
<div className="component-wrapper">
<GoogleMap
apiKey={process.env.REACT_APP_YOUR_API_KEY_HERE}
config={{
center: {