Protecting routes in EXPO Router, React-Native

Now, I want to protect (auth), (waitlist), (tabs) and other routes.
(waitlist) should be my first route when the user opens the application and only when he passes (waitlist) he can go to (auth) and also as soon as he passes (auth) he can go to (tabs)
How to do this in Expo Router

export const unstable_settings = {
// Ensure any route can link back to `/`
initialRouteName: "(waitlist)",
};

SplashScreen.preventAutoHideAsync();

export default function App() {
// const [appReady, setAppReady] = useState(false);
// const [splashAnimationFinished, setSplashAnimationFinished] = useState(false);
const [fontsLoaded, error] = useFonts({
"Manrope-Bold": require("../../assets/fonts/Manrope-Bold.ttf"),
"Manrope-ExtraBold": require("../../assets/fonts/Manrope-ExtraBold.ttf"),
"Manrope-ExtraLight": require("../../assets/fonts/Manrope-ExtraLight.ttf"),
"Manrope-Light": require("../../assets/fonts/Manrope-Light.ttf"),
"Manrope-SemiBold": require("../../assets/fonts/Manrope-SemiBold.ttf"),
"Manrope-Medium": require("../../assets/fonts/Manrope-Medium.ttf"),
"Manrope-Regular": require("../../assets/fonts/Manrope-Regular.ttf"),
});

OneSignal.Debug.setLogLevel(LogLevel.Verbose);
OneSignal.initialize("92293166-703c-43af-a644-0a0ba283ad60");

// Also need enable notifications to complete OneSignal setup
OneSignal.Notifications.requestPermission(true);

const onLayoutRootView = useCallback(async () => {
if (fontsLoaded || error) {
await SplashScreen.hideAsync();
}
}, [fontsLoaded, error]);

if (!fontsLoaded && !error) {
return null;
}

return (
<GestureHandlerRootView>
<BottomSheetModalProvider>
<Animated.View
style={{ flex: 1 }}
entering={FadeIn}
onLayout={onLayoutRootView}
>
<Stack screenOptions={{ animation: "fade" }}>
<Stack.Screen
name="(waitlist)"
options={{
headerShown: false,
}}
/>
<Stack.Screen
name="(auth)"
options={{
headerShown: false,
}}
/>
<Stack.Screen
name="(tabs)"
options={{
headerShown: false,
}}
/>
<Stack.Screen
name="product"
options={{
headerShown: false,
}}
/>
<Stack.Screen
name="products"
options={{
headerShown: false,
}}
/>
<Stack.Screen
name="size-guide"
options={{
headerShown: true,
headerShadowVisible: false,
title: "Size Guide",
headerTitleStyle: {
fontSize: 18,
fontFamily: "Manrope-Medium",
color: "#061023",
},
headerTitleAlign: "center",
headerLeft: () => <ChevronLeftButton />,
headerRight: () => <CartButton />,
}}
/>
<Stack.Screen
name="filter"
options={{
headerShown: true,
headerShadowVisible: false,
title: "Filter",
headerTitleStyle: {
fontSize: 18,
fontFamily: "Manrope-Medium",
color: "#061023",
},
headerTitleAlign: "center",
headerLeft: () => <CloseButton />,
}}
/>
<Stack.Screen
name="cart"
options={{
headerShown: true,
headerShadowVisible: false,
title: "",
headerTitleStyle: {
fontSize: 18,
fontFamily: "Manrope-Medium",
color: "#061023",
},
headerTitleAlign: "center",
headerLeft: () => <CloseButton />,
}}
/>
<Stack.Screen
name="checkout"
options={{
headerShown: true,
headerShadowVisible: false,
title: "Checkout",
headerTitleStyle: {
fontSize: 18,
fontFamily: "Manrope-Medium",
color: "#061023",
},
headerTitleAlign: "center",
headerLeft: () => <ChevronLeftButton />,
}}
/>
<Stack.Screen
name="add-address"
options={{
headerShown: true,
headerShadowVisible: false,
title: "Delivery address",
headerTitleStyle: {
fontSize: 18,
fontFamily: "Manrope-Medium",
color: "#061023",
},
headerTitleAlign: "center",
headerLeft: () => <ChevronLeftButton />,
}}
/>
<Stack.Screen
name="saved-addresses"
options={{
headerShown: true,
headerShadowVisible: false,
title: "Delivery address",
headerTitleStyle: {
fontSize: 18,
fontFamily: "Manrope-Medium",
color: "#061023",
},
headerTitleAlign: "center",
headerLeft: () => <ChevronLeftButton />,
}}
/>
</Stack>
<StatusBar style="dark" />
</Animated.View>
</BottomSheetModalProvider>
</GestureHandlerRootView>
);
}

I tried protecting the routes just like protecting in bare react native , conditional protection, but in expo router it is not doing the job, how can I in expo router protect the routes, I have tried reading the expo docs but I couldn’t understand how to do it

This is how my files are structured

New contributor

Abanoub Adel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật