|
@@ -127,6 +127,7 @@ const EventScreen = ({ route }: { route: any }) => {
|
|
|
const [currentImageIndex, setCurrentImageIndex] = useState(0);
|
|
|
const [nmId, setNmId] = useState<number | null>(null);
|
|
|
const [tooltipVisible, setTooltipVisible] = useState(false);
|
|
|
+ const [isWarningModalVisible, setIsWarningModalVisible] = useState<boolean>(false);
|
|
|
|
|
|
const { data: photosData } = useGetPhotosForRegionQuery(nmId ?? 0, nmId !== null);
|
|
|
|
|
@@ -383,6 +384,11 @@ const EventScreen = ({ route }: { route: any }) => {
|
|
|
};
|
|
|
|
|
|
const handleJoinEvent = async () => {
|
|
|
+ if (!token) {
|
|
|
+ setIsWarningModalVisible(true);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
if (event.settings.type !== 1) {
|
|
|
setModalInfo({
|
|
|
visible: true,
|
|
@@ -1538,6 +1544,11 @@ const EventScreen = ({ route }: { route: any }) => {
|
|
|
backgroundColor={Colors.DARK_BLUE}
|
|
|
onImageIndexChange={setActiveIndex}
|
|
|
/>
|
|
|
+ <WarningModal
|
|
|
+ type={'unauthorized'}
|
|
|
+ isVisible={isWarningModalVisible}
|
|
|
+ onClose={() => setIsWarningModalVisible(false)}
|
|
|
+ />
|
|
|
</View>
|
|
|
);
|
|
|
};
|