Skip to content

Commit

Permalink
yes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben Campos de Teba authored and Ruben Campos de Teba committed Jan 24, 2024
1 parent 2b93ba2 commit bc36aa9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/components/DonationBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const DonationBox = ({ tokenId, project }: IDonationBox) => {
process.env.NEXT_PUBLIC_BASE_ARTIFACT_PRICE,
'NEXT_PUBLIC_BASE_ARTIFACT_PRICE',
)


const { setVisibleModalWithAttrs, toggleModal, setVisibleModal } = useContext(LayoutContext)
const [sending, setSending] = useState<boolean>(false)
Expand Down
1 change: 1 addition & 0 deletions src/components/Layout/Header/AccountButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const AccountButton = ({ active, ...props }: SimpleComponentProps & { active: bo
console.log('privy user ', user)
console.log('loggedInUser', loggedInUser)


useEffect(() => {
const timer1 = setTimeout(() => {
if (ready && authenticated && !isConnected) {
Expand Down
3 changes: 1 addition & 2 deletions src/components/Layout/Modals/SubmitProjectModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ const SubmitProjectModal = () => {
return
}

// const artifactID = outcome?.[0].args.submissionID.toString()
const artifactID = newSubmissionCount


setProcessTxt(
`Submission published to blockchain, adding TokenID to Artifact in DB with ID: ${project.artifacts[0].id} `,
Expand Down
7 changes: 6 additions & 1 deletion src/lib/SeasonContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createContext, useEffect, useState } from 'react'
import { useQuery } from '@apollo/client'
import { GET_SEASON_FOR_TIME } from '@gql'
import { ISeasonForTimeQuery } from '@types'
import { useDateHelpers } from '@lib'
import { useDateHelpers, useFullSignOut } from '@lib'

/*
Expand Down Expand Up @@ -54,6 +54,7 @@ export const SeasonContextProvider = ({ children }: SimpleComponentProps) => {
const [localTimestamp, setLocalTimestamp] = useState<string>()
const [seasonId, setSeasonId] = useState<string>() // current or next season
const [seasonIndex, setSeasonIndex] = useState<number>() // current or next season
const { disconnectAndSignout } = useFullSignOut()

// 1. cache a timestamp upon site load
useEffect(() => {
Expand All @@ -76,6 +77,10 @@ export const SeasonContextProvider = ({ children }: SimpleComponentProps) => {

if (error) {
console.error('error retrieving season', error)
console.log('refreshing')
disconnectAndSignout()
console.log('disconnectAndSignout called')

}

// 3. use the season ID for the subscription
Expand Down
1 change: 1 addition & 0 deletions src/pages/api/auth/createUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { CREATE_USER, GET_USERS_AND_CURATORS } from '@gql'
import * as jsonwebtoken from 'jsonwebtoken'
import { ICreateUserMutation, IGetUsersAndCuratorsQuery } from '@types'


const createUser = async (req: NextApiRequest, res: NextApiResponse) => {
//review the token here
const { user } = req.body
Expand Down

0 comments on commit bc36aa9

Please sign in to comment.