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