import { useTheme } from '../../../../providers/Theme';
import { useDispatch } from 'react-redux';
import { openCollection } from 'providers/ReduxStore/slices/collections/actions';
import toast from 'react-hot-toast';
import styled from 'styled-components';
import StyledWrapper from './StyledWrapper';
const LinkStyle = styled.span`
color: ${(props) => props.theme['text-link']};
`;
const CreateOrOpenCollection = ({ onCreateClick }) => {
const { theme } = useTheme();
const dispatch = useDispatch();
const handleOpenCollection = () => {
dispatch(openCollection()).catch(
(err) => {
console.log(err);
toast.error('An error occurred while opening the collection');
}
);
};
const CreateLink = () => (
Create
);
const OpenLink = () => (
handleOpenCollection(true)}>
Open
);
return (
No collections found.
or Collection.
);
};
export default CreateOrOpenCollection;