import React, { useState } from 'react';
import { Colors } from '../../../theme';
import { PageWrapper, MenuButton, WarningModal } from '../../../components';
import { MenuButtonType } from '../../../types/components';
import FlagsIcon from '../../../../assets/icons/travels-section/flags.svg';
import RegionsIcon from '../../../../assets/icons/travels-section/regions.svg';
import MapLocationIcon from '../../../../assets/icons/travels-section/map-location.svg';
import SeriesIcon from '../../../../assets/icons/travels-section/series.svg';
import EarthIcon from '../../../../assets/icons/travels-section/earth.svg';
import TripIcon from '../../../../assets/icons/travels-section/trip.svg';
import ImagesIcon from '../../../../assets/icons/travels-section/images.svg';
import { NAVIGATION_PAGES } from 'src/types';
import { storage, StoreType } from '../../../storage';
const TravelsScreen = () => {
const [isModalVisible, setIsModalVisible] = useState(false);
const token = storage.get('token', StoreType.STRING);
const buttons: MenuButtonType[] = [
{
label: 'Countries',
icon:
},
{
label: 'Regions',
icon:
},
{
label: 'DARE',
icon:
},
{
label: 'Series',
icon: ,
buttonFn: (navigation) => {
if (!token) {
setIsModalVisible(true);
} else {
navigation.navigate(NAVIGATION_PAGES.SERIES);
}
}
},
{
label: 'Earth',
icon: ,
buttonFn: (navigation) => {
if (!token) {
setIsModalVisible(true);
} else {
navigation.navigate(NAVIGATION_PAGES.EARTH);
}
}
},
{
label: 'Trips',
icon: ,
buttonFn: (navigation) => {
if (!token) {
setIsModalVisible(true);
} else {
navigation.navigate(NAVIGATION_PAGES.TRIPS);
}
}
},
{
label: 'Photos',
icon: ,
buttonFn: (navigation) => {
if (!token) {
setIsModalVisible(true);
} else {
navigation.navigate(NAVIGATION_PAGES.PHOTOS);
}
}
}
];
return (
{buttons.map((button, index) => (
))}
setIsModalVisible(false)}
/>
);
};
export default TravelsScreen;