mirror of
https://github.com/urbit/shrub.git
synced 2024-12-23 19:05:48 +03:00
JoinGroup: set tutorial join date
This commit is contained in:
parent
7fc52405ce
commit
180ea74e51
@ -22,6 +22,7 @@ import { StatelessAsyncButton } from '~/views/components/StatelessAsyncButton';
|
|||||||
import { getModuleIcon } from '~/logic/lib/util';
|
import { getModuleIcon } from '~/logic/lib/util';
|
||||||
import { FormError } from '~/views/components/FormError';
|
import { FormError } from '~/views/components/FormError';
|
||||||
import { GroupSummary } from './GroupSummary';
|
import { GroupSummary } from './GroupSummary';
|
||||||
|
import {TUTORIAL_GROUP_RESOURCE} from '~/logic/lib/tutorialModal';
|
||||||
|
|
||||||
const formSchema = Yup.object({
|
const formSchema = Yup.object({
|
||||||
group: Yup.string()
|
group: Yup.string()
|
||||||
@ -72,6 +73,9 @@ export function JoinGroup(props: JoinGroupProps): ReactElement {
|
|||||||
|
|
||||||
const onConfirm = useCallback(async (group: string) => {
|
const onConfirm = useCallback(async (group: string) => {
|
||||||
const [,,ship,name] = group.split('/');
|
const [,,ship,name] = group.split('/');
|
||||||
|
if(group === TUTORIAL_GROUP_RESOURCE) {
|
||||||
|
await api.settings.putEntry('tutorial', 'joined', Date.now());
|
||||||
|
}
|
||||||
await api.groups.join(ship, name);
|
await api.groups.join(ship, name);
|
||||||
try {
|
try {
|
||||||
await waiter((p: JoinGroupProps) => {
|
await waiter((p: JoinGroupProps) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user