78 lines
2.7 KiB
TypeScript
78 lines
2.7 KiB
TypeScript
// Metro module 16189 (f16190).
|
|
import { useEffect } from "react";
|
|
import { View } from "react-native";
|
|
import { createStyles } from "../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../_bundle/Module712";
|
|
import * as _ReanimatedRexport from "../../reanimated/ReanimatedRexport";
|
|
import ReanimatedRexport, { useSharedValue, useAnimatedStyle } from "../../reanimated/ReanimatedRexport";
|
|
import * as _timing from "../../../design/animation/reanimated/timing/timing";
|
|
import ModalActionCreators from "../../../actions/ModalActionCreators";
|
|
import { NEW_MEMBER_ACTION_COMPLETE_MODAL_KEY } from "../GuildOnboardingHomeTypes";
|
|
import { Text } from "../../../design/components/Text/native/Text";
|
|
import { intl, t } from "../../../intl/index.native";
|
|
const useStyles = createStyles({
|
|
screen: {
|
|
flex: 1,
|
|
position: "absolute",
|
|
width: "100%",
|
|
height: "100%",
|
|
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
display: "flex",
|
|
alignItems: "center",
|
|
justifyContent: "center"
|
|
},
|
|
text: {
|
|
marginBottom: 16
|
|
},
|
|
progressBackground: {
|
|
borderRadius: Module712.radii.round,
|
|
height: 8,
|
|
backgroundColor: Module712.colors.BACKGROUND_MOD_NORMAL,
|
|
width: "60%"
|
|
},
|
|
progressForeground: {
|
|
backgroundColor: Module712.unsafe_rawColors.GREEN_330,
|
|
borderRadius: Module712.radii.round,
|
|
height: 8
|
|
}
|
|
});
|
|
const __initData = {
|
|
code: "function NewMemberActionsCompletedModalTsx1(){const{withDelay,withTiming,barWidth}=this.__closure;return{width:withDelay(500,withTiming(barWidth.get()*100+\"%\",{duration:700}))};}"
|
|
};
|
|
export default function NewMemberActionsCompleted(props) {
|
|
const { initialPercent, numActions } = props;
|
|
const styles = useStyles();
|
|
const sharedValue = useSharedValue(initialPercent);
|
|
useEffect(() => {
|
|
sharedValue.set(1);
|
|
}, [sharedValue]);
|
|
const b = function b() {
|
|
return {
|
|
width: _ReanimatedRexport.withDelay(500, _timing.withTiming(100 * sharedValue.get() + "%", {
|
|
duration: 700
|
|
}))
|
|
};
|
|
};
|
|
b.__closure = {
|
|
withDelay: _ReanimatedRexport.withDelay,
|
|
withTiming: _timing.withTiming,
|
|
barWidth: sharedValue
|
|
};
|
|
b.__workletHash = 7643178959760;
|
|
b.__initData = __initData;
|
|
const animatedStyle = useAnimatedStyle(b);
|
|
useEffect(() => {
|
|
setTimeout(() => ModalActionCreators.popWithKey(NEW_MEMBER_ACTION_COMPLETE_MODAL_KEY), 2500);
|
|
}, []);
|
|
return <View style={styles.screen}>
|
|
<Text style={styles.text} variant="heading-xl/semibold" color="text-overlay-light">
|
|
{intl.format(t.pGj5u2, {
|
|
count: numActions
|
|
})}
|
|
</Text>
|
|
<View style={styles.progressBackground}>
|
|
<ReanimatedRexport.View style={[styles.progressForeground, animatedStyle]} />
|
|
</View>
|
|
</View>;
|
|
};
|