Skip to content

Commit

Permalink
Update configs
Browse files Browse the repository at this point in the history
  • Loading branch information
mpgxvii committed Nov 4, 2024
1 parent be96022 commit 74bae26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 4 additions & 2 deletions pages/apps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ import Link from "next/link"
import { useRouter } from "next/router"
import { ReactNode, useEffect, useState } from "react"
import QRCode from "react-qr-code"
import getConfig from "next/config"

import { ActionCard, CenterLink, Methods, CardTitle } from "../pkg"
import ory from "../pkg/sdk"

const { publicRuntimeConfig } = getConfig()

interface Props {
flow?: SettingsFlow
only?: Methods
Expand All @@ -24,8 +27,7 @@ function AppLoginCard({ children }: Props & { children: ReactNode }) {

const Apps: NextPage = () => {
const router = useRouter()
const DefaultHydraUrl =
process.env.HYDRA_PUBLIC_URL || "http://localhost:4444"
const DefaultHydraUrl = publicRuntimeConfig.hydraPublicUrl
const { flow: flowId, return_to: returnTo } = router.query
const [traits, setTraits] = useState<any>()
const [projects, setProjects] = useState<any>([])
Expand Down
6 changes: 1 addition & 5 deletions pages/fitbit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ function AppLoginCard({ children }: Props & { children: ReactNode }) {

const Fitbit: NextPage = () => {
const router = useRouter()
const DefaultHydraUrl =
process.env.HYDRA_PUBLIC_URL || "http://localhost:4444"
const { flow: flowId, return_to: returnTo } = router.query
const [traits, setTraits] = useState<any>()
const [projects, setProjects] = useState<any>([])
Expand Down Expand Up @@ -80,7 +78,6 @@ const Fitbit: NextPage = () => {
<CardTitle>App Login</CardTitle>
<QrForm
projects={projects}
baseUrl={DefaultHydraUrl}
navigate={handleNavigation}
/>
</AppLoginCard>
Expand All @@ -95,11 +92,10 @@ const Fitbit: NextPage = () => {

interface QrFormProps {
projects: any[]
baseUrl: string
navigate: any
}

const QrForm: React.FC<QrFormProps> = ({ projects, baseUrl, navigate }) => {
const QrForm: React.FC<QrFormProps> = ({ projects, navigate }) => {
if (projects) {
return (
<div className="center">
Expand Down

0 comments on commit 74bae26

Please sign in to comment.