updated collection id type to number

This commit is contained in:
Abhinav-grd 2021-02-08 14:50:27 +05:30
parent 6c054f5784
commit 99d547016e
3 changed files with 4 additions and 4 deletions

View file

@ -5,7 +5,7 @@ import styled from 'styled-components';
interface CollectionProps {
collections: collection[];
selected?: string;
selectCollection: (id?: string) => void;
selectCollection: (id?: number) => void;
}
const Container = styled.div`
@ -51,7 +51,7 @@ const Chip = styled.button<{ active: boolean }>`
export default function Collections(props: CollectionProps) {
const { selected, collections, selectCollection } = props;
const clickHandler = (id?: string) => () => selectCollection(id);
const clickHandler = (id?: number) => () => selectCollection(id);
return <Container>
<Wrapper>

View file

@ -276,7 +276,7 @@ export default function Gallery(props) {
);
}
const selectCollection = (id?: string) => {
const selectCollection = (id?: number) => {
const href = `/gallery?collection=${id || ''}`;
router.push(href, undefined, { shallow: true });
};

View file

@ -49,7 +49,7 @@ interface objectKeys {
}
interface uploadFile extends objectKeys {
collectionID: string,
collectionID: number,
encryptedKey: string;
keyDecryptionNonce: string;
metadata?: {