commit
057433749b
|
@ -119,23 +119,11 @@ export default function LandingPage() {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleAlbumsRedirect = async (currentURL: URL) => {
|
const handleAlbumsRedirect = async (currentURL: URL) => {
|
||||||
await router.push({
|
await router.replace({
|
||||||
pathname: PAGES.SHARED_ALBUMS,
|
pathname: PAGES.SHARED_ALBUMS,
|
||||||
search: currentURL.search,
|
search: currentURL.search,
|
||||||
hash: currentURL.hash,
|
hash: currentURL.hash,
|
||||||
});
|
});
|
||||||
await router.push(
|
|
||||||
{
|
|
||||||
pathname: PAGES.SHARED_ALBUMS,
|
|
||||||
search: currentURL.search,
|
|
||||||
hash: currentURL.hash,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
pathname: PAGES.ROOT,
|
|
||||||
search: currentURL.search,
|
|
||||||
hash: currentURL.hash,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
await initLocalForage();
|
await initLocalForage();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ import EnteSpinner from 'components/EnteSpinner';
|
||||||
import LoadingBar from 'react-top-loading-bar';
|
import LoadingBar from 'react-top-loading-bar';
|
||||||
import CryptoWorker from 'utils/crypto';
|
import CryptoWorker from 'utils/crypto';
|
||||||
import { PAGES } from 'constants/pages';
|
import { PAGES } from 'constants/pages';
|
||||||
import router from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
|
|
||||||
const Loader = () => (
|
const Loader = () => (
|
||||||
<Container>
|
<Container>
|
||||||
|
@ -51,6 +51,7 @@ export default function PublicCollectionGallery() {
|
||||||
const closeReportForm = () => setAbuseReportFormView(false);
|
const closeReportForm = () => setAbuseReportFormView(false);
|
||||||
const loadingBar = useRef(null);
|
const loadingBar = useRef(null);
|
||||||
const isLoadingBarRunning = useRef(false);
|
const isLoadingBarRunning = useRef(false);
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
const openMessageDialog = () => setMessageDialogView(true);
|
const openMessageDialog = () => setMessageDialogView(true);
|
||||||
const closeMessageDialog = () => setMessageDialogView(false);
|
const closeMessageDialog = () => setMessageDialogView(false);
|
||||||
|
@ -68,7 +69,7 @@ export default function PublicCollectionGallery() {
|
||||||
appContext.showNavBar(true);
|
appContext.showNavBar(true);
|
||||||
const currentURL = new URL(window.location.href);
|
const currentURL = new URL(window.location.href);
|
||||||
if (currentURL.pathname !== PAGES.ROOT) {
|
if (currentURL.pathname !== PAGES.ROOT) {
|
||||||
router.push(
|
router.replace(
|
||||||
{
|
{
|
||||||
pathname: PAGES.SHARED_ALBUMS,
|
pathname: PAGES.SHARED_ALBUMS,
|
||||||
search: currentURL.search,
|
search: currentURL.search,
|
||||||
|
@ -78,6 +79,9 @@ export default function PublicCollectionGallery() {
|
||||||
pathname: PAGES.ROOT,
|
pathname: PAGES.ROOT,
|
||||||
search: currentURL.search,
|
search: currentURL.search,
|
||||||
hash: currentURL.hash,
|
hash: currentURL.hash,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
shallow: true,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -140,7 +144,7 @@ export default function PublicCollectionGallery() {
|
||||||
collectionKey.current
|
collectionKey.current
|
||||||
);
|
);
|
||||||
setPublicCollection(null);
|
setPublicCollection(null);
|
||||||
setPublicFiles([]);
|
setPublicFiles(null);
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
finishLoadingBar();
|
finishLoadingBar();
|
||||||
|
@ -150,7 +154,7 @@ export default function PublicCollectionGallery() {
|
||||||
if (!publicFiles && loading) {
|
if (!publicFiles && loading) {
|
||||||
return <Loader />;
|
return <Loader />;
|
||||||
}
|
}
|
||||||
if (!publicFiles?.length && !loading) {
|
if (!publicFiles && !loading) {
|
||||||
return <Container>{constants.NOT_FOUND}</Container>;
|
return <Container>{constants.NOT_FOUND}</Container>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ const englishConstants = {
|
||||||
ENTER_ALBUM_NAME: 'album name',
|
ENTER_ALBUM_NAME: 'album name',
|
||||||
CLOSE: 'close',
|
CLOSE: 'close',
|
||||||
NO: 'no',
|
NO: 'no',
|
||||||
NOTHING_HERE: 'nothing to see here, yet',
|
NOTHING_HERE: 'nothing to see here eyes 👀',
|
||||||
UPLOAD: {
|
UPLOAD: {
|
||||||
0: 'preparing to upload',
|
0: 'preparing to upload',
|
||||||
1: 'reading google metadata files',
|
1: 'reading google metadata files',
|
||||||
|
@ -609,7 +609,7 @@ const englishConstants = {
|
||||||
OPEN_PLAN_SELECTOR_MODAL_FAILED: 'failed to open plans',
|
OPEN_PLAN_SELECTOR_MODAL_FAILED: 'failed to open plans',
|
||||||
COMMENT: 'comment',
|
COMMENT: 'comment',
|
||||||
ABUSE_REPORT_DESCRIPTION:
|
ABUSE_REPORT_DESCRIPTION:
|
||||||
'Note: Submitting this report will notify the album owner.',
|
'submitting this report will notify the album owner.',
|
||||||
OTHER_REASON_REQUIRES_COMMENTS:
|
OTHER_REASON_REQUIRES_COMMENTS:
|
||||||
'reason = other, require a mandatory comment ',
|
'reason = other, require a mandatory comment ',
|
||||||
REPORT_SUBMIT_SUCCESS_CONTENT: 'your report has been submitted',
|
REPORT_SUBMIT_SUCCESS_CONTENT: 'your report has been submitted',
|
||||||
|
|
Loading…
Reference in a new issue