updated collection id type to number
This commit is contained in:
parent
6c054f5784
commit
99d547016e
3 changed files with 4 additions and 4 deletions
|
@ -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>
|
||||
|
|
|
@ -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 });
|
||||
};
|
||||
|
|
|
@ -49,7 +49,7 @@ interface objectKeys {
|
|||
}
|
||||
|
||||
interface uploadFile extends objectKeys {
|
||||
collectionID: string,
|
||||
collectionID: number,
|
||||
encryptedKey: string;
|
||||
keyDecryptionNonce: string;
|
||||
metadata?: {
|
||||
|
|
Loading…
Add table
Reference in a new issue