'use client'; import { FC } from 'react'; import clsx from 'clsx'; import Image from 'next/image'; import { useLaunchStore } from '@gitroom/frontend/components/new-launch/store'; import { useShallow } from 'zustand/react/shallow'; export const PicksSocialsComponent: FC<{ toolTip?: boolean }> = ({ toolTip, }) => { const { addOrRemoveSelectedIntegration, integrations, selectedIntegrations } = useLaunchStore( useShallow((state) => ({ integrations: state.integrations, selectedIntegrations: state.selectedIntegrations, addOrRemoveSelectedIntegration: state.addOrRemoveSelectedIntegration, })) ); return (
{integrations .filter((f) => !f.inBetweenSteps) .map((integration) => (
addOrRemoveSelectedIntegration(integration, {}) } className={clsx( 'cursor-pointer relative w-[34px] h-[34px] rounded-full flex justify-center items-center bg-fifth filter transition-all duration-500', selectedIntegrations.findIndex( (p) => p.integration.id === integration.id ) === -1 ? 'opacity-40' : '' )} > {integration.identifier} {integration.identifier === 'youtube' ? ( ) : ( {integration.identifier} )}
))}
); };