mirror of
https://github.com/aljazceru/nostr-profile-manager.git
synced 2025-12-17 05:34:20 +01:00
prevent navigation before profile events fetched from relays
This commit is contained in:
12
src/index.ts
12
src/index.ts
@@ -16,12 +16,6 @@ declare global {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const loadProfile = async () => {
|
const loadProfile = async () => {
|
||||||
// turn on nav
|
|
||||||
(document.getElementById('mainnav') as HTMLElement).classList.remove('inactive');
|
|
||||||
(document.getElementById('navhome') as HTMLElement).onclick = LoadProfileHome;
|
|
||||||
(document.getElementById('navmetadata') as HTMLElement).onclick = LoadMetadataPage;
|
|
||||||
(document.getElementById('navcontacts') as HTMLElement).onclick = LoadContactsPage;
|
|
||||||
(document.getElementById('navrelays') as HTMLElement).onclick = LoadRelaysPage;
|
|
||||||
// load profile page (in loading mode)
|
// load profile page (in loading mode)
|
||||||
LoadProfileHome();
|
LoadProfileHome();
|
||||||
// load profile data
|
// load profile data
|
||||||
@@ -31,6 +25,12 @@ const loadProfile = async () => {
|
|||||||
);
|
);
|
||||||
// load profile page (in complete mode)
|
// load profile page (in complete mode)
|
||||||
LoadProfileHome();
|
LoadProfileHome();
|
||||||
|
// turn on nav
|
||||||
|
(document.getElementById('mainnav') as HTMLElement).classList.remove('inactive');
|
||||||
|
(document.getElementById('navhome') as HTMLElement).onclick = LoadProfileHome;
|
||||||
|
(document.getElementById('navmetadata') as HTMLElement).onclick = LoadMetadataPage;
|
||||||
|
(document.getElementById('navcontacts') as HTMLElement).onclick = LoadContactsPage;
|
||||||
|
(document.getElementById('navrelays') as HTMLElement).onclick = LoadRelaysPage;
|
||||||
};
|
};
|
||||||
|
|
||||||
const LoadLandingPage = () => {
|
const LoadLandingPage = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user