-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from AndyOooh/ED1-47-fix-create-event-button
Ed1 47 fix create event button
- Loading branch information
Showing
23 changed files
with
134 additions
and
59 deletions.
There are no files selected for viewing
21 changes: 0 additions & 21 deletions
21
apps/app/src/app/(protected)/components/HomeMain/HomeMain.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,11 @@ | ||
'use client'; | ||
|
||
import React from 'react'; | ||
import { Stats } from './stats/Stats'; | ||
import { ReferralAd } from './referralAd/ReferralAd'; | ||
import { createDocument } from '__firebase/utilities'; | ||
|
||
export const HomeMain = () => { | ||
const submitHandler = async () => { | ||
try { | ||
console.log('submitHandler'); | ||
await createDocument('emul-test', { test: 'it works' }); | ||
console.log('Check the database'); | ||
} catch (error) { | ||
console.log('🚀 file: HomeMain.tsx:17 error:', error); | ||
} | ||
}; | ||
|
||
return ( | ||
// <div className='flex-1 bg-green-200/20'> | ||
<div className='flex-1 flex flex-col gap-8 p-5'> | ||
<Stats /> | ||
<ReferralAd /> | ||
|
||
{process.env.NEXT_PUBLIC_EMULATORS_ON === 'true' && ( | ||
<button className='btn' onClick={submitHandler}> | ||
Test Emulator | ||
</button> | ||
)} | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
apps/app/src/app/(protected)/events/components/create-event-button.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
'use client'; | ||
|
||
import { CurrUserContext } from 'app/(protected)/components/Providers/CurrentUserProvider'; | ||
import Link from 'next/link'; | ||
import React, { useContext } from 'react'; | ||
|
||
export const CreateEventButton = () => { | ||
const { currentUser } = useContext(CurrUserContext); | ||
console.log('😍😍😍😍 currentUser:', currentUser); | ||
return currentUser?.customClaims.type === 'business' ? ( | ||
<Link href={'/events/create'} className='btn'> | ||
Create Event | ||
</Link> | ||
) : null; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { createDocument } from '__firebase/utilities'; | ||
|
||
export default function TestEmulatorPage() { | ||
const submitHandler = async () => { | ||
try { | ||
console.log('submitHandler'); | ||
await createDocument('emul-test', { id: 123, test: 'it works' }); | ||
} catch (error) { | ||
console.log('🚀 file: HomeMain.tsx:17 error:', error); | ||
} | ||
}; | ||
return ( | ||
<div className='flex flex-col gap-4 w-full'> | ||
<h1 className='text-3xl'>Test Emulator Page</h1> | ||
{process.env.NEXT_PUBLIC_EMULATORS_ON === 'true' && ( | ||
<button className='btn' onClick={submitHandler}> | ||
Test Emulator | ||
</button> | ||
)} | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/firebase-cloud-functions/emulator-data/auth_export/accounts.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"kind":"identitytoolkit#DownloadAccountResponse","users":[{"localId":"DI4Dx3YiiDonUcaz0UiiFjdCUkAU","createdAt":"1704033339723","lastLoginAt":"1704033339727","displayName":"Orange Chicken","photoUrl":"http://localhost:9199/v0/b/event-dee-staging.appspot.com/o/users%2FDI4Dx3YiiDonUcaz0UiiFjdCUkAU%2Fimages%2Fprofile?alt=media&token=aaa55962-ac74-4b1d-8045-7c688f925cc4","customAttributes":"{\"basic_info_done\":true,\"type\":\"freelancer\"}","providerUserInfo":[{"providerId":"google.com","rawId":"6233296176568572704053954672800598602635","federatedId":"6233296176568572704053954672800598602635","displayName":"Orange Chicken","email":"[email protected]","screenName":"chicken_orange"}],"validSince":"1705214817","email":"[email protected]","emailVerified":true,"disabled":false},{"localId":"XobXVTMfKX21NwEP7V5LEuuX4q8u","createdAt":"1704023132744","lastLoginAt":"1704023132744","photoUrl":"http://localhost:9199/v0/b/event-dee-staging.appspot.com/o/users%2FXobXVTMfKX21NwEP7V5LEuuX4q8u%2Fimages%2Fprofile?alt=media&token=be3f3bef-d833-4dd0-b275-11a58ec238a3","passwordHash":"fakeHash:salt=fakeSaltUu0sqgKGXdW18M52lrCJ:password=oooooo","salt":"fakeSaltUu0sqgKGXdW18M52lrCJ","passwordUpdatedAt":1705214817929,"customAttributes":"{\"basic_info_done\":true,\"type\":\"freelancer\"}","providerUserInfo":[{"providerId":"password","email":"[email protected]","federatedId":"[email protected]","rawId":"[email protected]","photoUrl":"http://localhost:9199/v0/b/event-dee-staging.appspot.com/o/users%2FXobXVTMfKX21NwEP7V5LEuuX4q8u%2Fimages%2Fprofile?alt=media&token=be3f3bef-d833-4dd0-b275-11a58ec238a3"}],"validSince":"1705214817","email":"[email protected]","emailVerified":false,"disabled":false},{"localId":"qIsokoD9bxhWt2tcFdcNpAg0DPZb","createdAt":"1704107208217","lastLoginAt":"1704912527992","photoUrl":"https://storage.cloud.google.com/event-dee-staging.appspot.com/misc/profile-photo-placeholder.jpg","passwordHash":"fakeHash:salt=fakeSalth89eFQSxrdhCytX68Nxe:password=bbbbbb","salt":"fakeSalth89eFQSxrdhCytX68Nxe","passwordUpdatedAt":1705214817929,"customAttributes":"{\"basic_info_done\":true,\"type\":\"business\"}","providerUserInfo":[{"providerId":"password","email":"[email protected]","federatedId":"[email protected]","rawId":"[email protected]","photoUrl":"https://storage.cloud.google.com/event-dee-staging.appspot.com/misc/profile-photo-placeholder.jpg"}],"validSince":"1705214817","email":"[email protected]","emailVerified":false,"disabled":false}]} | ||
{"kind":"identitytoolkit#DownloadAccountResponse","users":[{"localId":"DI4Dx3YiiDonUcaz0UiiFjdCUkAU","createdAt":"1704033339723","lastLoginAt":"1704033339727","displayName":"Orange Chicken","photoUrl":"http://localhost:9199/v0/b/event-dee-staging.appspot.com/o/users%2FDI4Dx3YiiDonUcaz0UiiFjdCUkAU%2Fimages%2Fprofile?alt=media&token=aaa55962-ac74-4b1d-8045-7c688f925cc4","customAttributes":"{\"basic_info_done\":true,\"type\":\"freelancer\"}","providerUserInfo":[{"providerId":"google.com","rawId":"6233296176568572704053954672800598602635","federatedId":"6233296176568572704053954672800598602635","displayName":"Orange Chicken","email":"[email protected]","screenName":"chicken_orange"}],"validSince":"1705773834","email":"[email protected]","emailVerified":true,"disabled":false},{"localId":"XobXVTMfKX21NwEP7V5LEuuX4q8u","createdAt":"1704023132744","lastLoginAt":"1704023132744","photoUrl":"http://localhost:9199/v0/b/event-dee-staging.appspot.com/o/users%2FXobXVTMfKX21NwEP7V5LEuuX4q8u%2Fimages%2Fprofile?alt=media&token=be3f3bef-d833-4dd0-b275-11a58ec238a3","passwordHash":"fakeHash:salt=fakeSaltUu0sqgKGXdW18M52lrCJ:password=oooooo","salt":"fakeSaltUu0sqgKGXdW18M52lrCJ","passwordUpdatedAt":1705773834089,"customAttributes":"{\"basic_info_done\":true,\"type\":\"freelancer\"}","providerUserInfo":[{"providerId":"password","email":"[email protected]","federatedId":"[email protected]","rawId":"[email protected]","photoUrl":"http://localhost:9199/v0/b/event-dee-staging.appspot.com/o/users%2FXobXVTMfKX21NwEP7V5LEuuX4q8u%2Fimages%2Fprofile?alt=media&token=be3f3bef-d833-4dd0-b275-11a58ec238a3"}],"validSince":"1705773834","email":"[email protected]","emailVerified":false,"disabled":false},{"localId":"qIsokoD9bxhWt2tcFdcNpAg0DPZb","createdAt":"1704107208217","lastLoginAt":"1705774752210","photoUrl":"https://storage.cloud.google.com/event-dee-staging.appspot.com/misc/profile-photo-placeholder.jpg","passwordHash":"fakeHash:salt=fakeSalth89eFQSxrdhCytX68Nxe:password=bbbbbb","salt":"fakeSalth89eFQSxrdhCytX68Nxe","passwordUpdatedAt":1705773834089,"customAttributes":"{\"basic_info_done\":true,\"type\":\"business\"}","providerUserInfo":[{"providerId":"password","email":"[email protected]","federatedId":"[email protected]","rawId":"[email protected]","photoUrl":"https://storage.cloud.google.com/event-dee-staging.appspot.com/misc/profile-photo-placeholder.jpg"}],"validSince":"1705773834","email":"[email protected]","emailVerified":false,"disabled":false,"lastRefreshAt":"2024-01-20T19:06:09.807Z"}]} |
Binary file modified
BIN
+0 Bytes
(100%)
...r-data/firestore_export/all_namespaces/all_kinds/all_namespaces_all_kinds.export_metadata
Binary file not shown.
Binary file modified
BIN
+230 Bytes
(100%)
...firebase-cloud-functions/emulator-data/firestore_export/all_namespaces/all_kinds/output-0
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...e-cloud-functions/emulator-data/firestore_export/firestore_export.overall_export_metadata
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f571eaf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
dev-event-dee2 – ./apps/app
dev-event-dee2-andyoooh.vercel.app
dev-event-dee2.vercel.app
dev-event-dee2-git-main-andyoooh.vercel.app
f571eaf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
app-event-dee2 – ./apps/app
app-event-dee2.vercel.app
app-event-dee2-git-main-andyoooh.vercel.app
app-event-dee2-andyoooh.vercel.app