JoinGroup: set tutorial join date

This commit is contained in:
Liam Fitzgerald 2021-03-03 13:17:27 +10:00 committed by Jimmy Young
parent 7fc52405ce
commit 180ea74e51

View File

@ -22,6 +22,7 @@ import { StatelessAsyncButton } from '~/views/components/StatelessAsyncButton';
import { getModuleIcon } from '~/logic/lib/util';
import { FormError } from '~/views/components/FormError';
import { GroupSummary } from './GroupSummary';
import {TUTORIAL_GROUP_RESOURCE} from '~/logic/lib/tutorialModal';
const formSchema = Yup.object({
group: Yup.string()
@ -72,6 +73,9 @@ export function JoinGroup(props: JoinGroupProps): ReactElement {
const onConfirm = useCallback(async (group: string) => {
const [,,ship,name] = group.split('/');
if(group === TUTORIAL_GROUP_RESOURCE) {
await api.settings.putEntry('tutorial', 'joined', Date.now());
}
await api.groups.join(ship, name);
try {
await waiter((p: JoinGroupProps) => {