import { Input } from "./Input";
import { NLView } from "../../types";
import { SOCIAL_MEDIA } from "../UserWidget";
import { SocialLink } from "../../Components/SocialLink";
import { Success } from "../Icons/Success";
import { stage } from "../../config";
import { useAppState } from "../../overmind";
import Button from "antd/lib/button";
import Form from "antd/lib/form";
export const SocialMediaInputs: NLView<{ enableVerify?: boolean }> = ({ enableVerify }) => {
const state = useAppState();
const onVerifySocial = (provider: string) => {
window.open(
`https://api-${stage}.newlife.io/creator/auth/provider/${provider}?token=${state.firebase.token}&redirect_url=${window.location.href}`,
"_self",
);
};
const verify = (provider: string): React.ReactNode => {
if (provider === "soundcloud" || !enableVerify) {
return false;
}
const sanitizedProvider = provider.replace(/[0-9]/g, "");
return !isSocialVerified(sanitizedProvider) ? (
) : (