From df5bef7d5ccab0ffd1be21cb06f075fb735f48ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= Date: Mon, 26 Aug 2024 13:51:08 +0200 Subject: [PATCH] fix: allow deleting storage item --- app/_layout.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/_layout.tsx b/app/_layout.tsx index fe7e062..cf6d123 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -3,7 +3,7 @@ import "../lib/applyGlobalPolyfills"; import "~/global.css"; import { Text } from '~/components/ui/text'; import { Theme, ThemeProvider } from "@react-navigation/native"; -import { router, SplashScreen, Stack } from "expo-router"; +import { Link, router, SplashScreen, Stack } from "expo-router"; import { StatusBar } from "expo-status-bar"; import * as React from "react"; import { SafeAreaView } from "react-native"; @@ -78,6 +78,11 @@ export default function RootLayout() { return null; } + async function reset() { + await AsyncStorage.removeItem("hasOnboarded"); + router.navigate("/") + } + return ( @@ -86,6 +91,9 @@ export default function RootLayout() { +