|
|
|
@ -7,6 +7,7 @@ import { |
|
|
|
|
TouchableOpacity, |
|
|
|
|
ActivityIndicator, |
|
|
|
|
} from "react-native"; |
|
|
|
|
import { copilot, walkthroughable, CopilotStep } from "react-native-copilot"; |
|
|
|
|
|
|
|
|
|
import Svg, { |
|
|
|
|
G, |
|
|
|
@ -33,6 +34,8 @@ import Colors from "../constants/Colors"; |
|
|
|
|
import tw from "tailwind-rn"; |
|
|
|
|
import fontSize from "../constants/fontSize"; |
|
|
|
|
|
|
|
|
|
const CopilotView = walkthroughable(View); |
|
|
|
|
|
|
|
|
|
const Navbar = ({ |
|
|
|
|
notification, |
|
|
|
|
setBoxPosition, |
|
|
|
@ -42,9 +45,16 @@ const Navbar = ({ |
|
|
|
|
userFavoriteList, |
|
|
|
|
theme, |
|
|
|
|
bookmarkLoading, |
|
|
|
|
...props |
|
|
|
|
}) => { |
|
|
|
|
const navigation = useNavigation(); |
|
|
|
|
|
|
|
|
|
React.useEffect(() => { |
|
|
|
|
setTimeout(() => { |
|
|
|
|
props.start(); |
|
|
|
|
}, 800); |
|
|
|
|
}, []); |
|
|
|
|
|
|
|
|
|
const isActiveBookmark = React.useMemo(() => { |
|
|
|
|
return userFavoriteList.filter((object) => |
|
|
|
|
headerOptions.bookmarkItem?.productId |
|
|
|
@ -64,7 +74,6 @@ const Navbar = ({ |
|
|
|
|
borderColor: |
|
|
|
|
theme === "light" ? Colors.theme1.green79 : Colors.theme1.white, |
|
|
|
|
borderWidth: 1, |
|
|
|
|
marginLeft: route === "AR" ? 10 : 0, |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
|
onPress={() => navigation.navigate(route, { page: state })} |
|
|
|
@ -86,6 +95,7 @@ const Navbar = ({ |
|
|
|
|
? Colors.theme1.white |
|
|
|
|
: Colors.theme1.dark, |
|
|
|
|
height: 64, |
|
|
|
|
zIndex: 100, |
|
|
|
|
}, |
|
|
|
|
]} |
|
|
|
|
> |
|
|
|
@ -414,9 +424,19 @@ const Navbar = ({ |
|
|
|
|
) : null} |
|
|
|
|
{headerOptions?.qr ? ( |
|
|
|
|
<> |
|
|
|
|
<CopilotStep |
|
|
|
|
text="This is a hello world example!" |
|
|
|
|
order={1} |
|
|
|
|
name="hello" |
|
|
|
|
> |
|
|
|
|
<CopilotView> |
|
|
|
|
<Button |
|
|
|
|
icon={ |
|
|
|
|
<Svg xmlns="http://www.w3.org/2000/svg" width={30} height={30}> |
|
|
|
|
<Svg |
|
|
|
|
xmlns="http://www.w3.org/2000/svg" |
|
|
|
|
width={30} |
|
|
|
|
height={30} |
|
|
|
|
> |
|
|
|
|
<G |
|
|
|
|
fill={ |
|
|
|
|
theme === "light" |
|
|
|
@ -598,6 +618,15 @@ const Navbar = ({ |
|
|
|
|
route={"QR"} |
|
|
|
|
state={"book"} |
|
|
|
|
/> |
|
|
|
|
</CopilotView> |
|
|
|
|
</CopilotStep> |
|
|
|
|
<View style={{ marginHorizontal: 5 }}></View> |
|
|
|
|
<CopilotStep |
|
|
|
|
text="This is a hello world example!!" |
|
|
|
|
order={2} |
|
|
|
|
name="helloo" |
|
|
|
|
> |
|
|
|
|
<CopilotView> |
|
|
|
|
<Button |
|
|
|
|
icon={ |
|
|
|
|
<Svg |
|
|
|
@ -644,6 +673,8 @@ const Navbar = ({ |
|
|
|
|
route={"AR"} |
|
|
|
|
state={"AR"} |
|
|
|
|
/> |
|
|
|
|
</CopilotView> |
|
|
|
|
</CopilotStep> |
|
|
|
|
</> |
|
|
|
|
) : null} |
|
|
|
|
{headerOptions?.bookmark ? ( |
|
|
|
@ -723,4 +754,13 @@ const mapDispatchToProps = { |
|
|
|
|
deleteBookmark: userFavorite.del, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Navbar); |
|
|
|
|
const component = copilot({ |
|
|
|
|
labels: { |
|
|
|
|
previous: "قبلی", |
|
|
|
|
next: "بعدی", |
|
|
|
|
skip: "رد کردن", |
|
|
|
|
finish: "پایان", |
|
|
|
|
}, |
|
|
|
|
})(Navbar); |
|
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(component); |
|
|
|
|