mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-06 00:04:39 +00:00
fix: Error on release and collection page if user isn't authorized
This commit is contained in:
parent
ea44bbf0e1
commit
5b68da425b
3 changed files with 3 additions and 3 deletions
|
@ -27,7 +27,7 @@ export const ReleaseInfoUserList = (props: {
|
||||||
setUserList: any;
|
setUserList: any;
|
||||||
setIsFavorite: any;
|
setIsFavorite: any;
|
||||||
collection_count: number;
|
collection_count: number;
|
||||||
profile_id: number;
|
profile_id: number | null;
|
||||||
}) => {
|
}) => {
|
||||||
const [AddReleaseToCollectionModalOpen, setAddReleaseToCollectionModalOpen] =
|
const [AddReleaseToCollectionModalOpen, setAddReleaseToCollectionModalOpen] =
|
||||||
useState(false);
|
useState(false);
|
||||||
|
|
|
@ -97,7 +97,7 @@ export function CollectionsFullPage(props: {
|
||||||
sectionTitle={props.title}
|
sectionTitle={props.title}
|
||||||
content={content}
|
content={content}
|
||||||
isMyCollections={
|
isMyCollections={
|
||||||
props.type == "profile" && props.profile_id == userStore.user.id
|
props.type == "profile" && userStore.user && props.profile_id == userStore.user.id
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
) : !isLoadingEnd || isLoading ? (
|
) : !isLoadingEnd || isLoading ? (
|
||||||
|
|
|
@ -86,7 +86,7 @@ export const ReleasePage = (props: any) => {
|
||||||
isFavorite={userFavorite}
|
isFavorite={userFavorite}
|
||||||
release_id={data.release.id}
|
release_id={data.release.id}
|
||||||
token={userStore.token}
|
token={userStore.token}
|
||||||
profile_id={userStore.user.id}
|
profile_id={userStore.user ? userStore.user.id : null}
|
||||||
setUserList={setUserList}
|
setUserList={setUserList}
|
||||||
setIsFavorite={setUserFavorite}
|
setIsFavorite={setUserFavorite}
|
||||||
collection_count={data.release.collection_count}
|
collection_count={data.release.collection_count}
|
||||||
|
|
Loading…
Add table
Reference in a new issue