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