import classNames from 'classnames';
import { Header } from 'components/Header';
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
type StepState = {
next: boolean,
prev: boolean,
}
type Step = {
title: string,
element: React.FC<{ onChange: (v: StepState) => void }>,
}
const Steps: React.FC<{ steps: Step[], className?: string }> = ({ className, steps }) => {
const { t } = useTranslation();
const [step, setStep] = useState(0);
const [state, setState] = useState({ next: true, prev: true });
const hasPrev = step > 0;
const hasNext = step < steps.length - 1;
const Content = steps[step].element;
return
{/*
{steps.map(({ title }, i) => - {title}
)}
*/}
{Content &&
}
}
const LoginNintendoAccount: React.FC<{ onChange: (v: StepState) => void }> = ({ onChange }) => {
const { t } = useTranslation();
return
}
export const Guide: React.FC = () => {
const { t } = useTranslation();
const steps: Step[] = [{
title: t('登录Nintendo Account'),
element: LoginNintendoAccount,
}, {
title: t('填写stat.ink API密钥'),
element: () => <>>,
}, {
title: t('完成'),
element: () => <>>,
}]
return
}