Skip to content

Commit

Permalink
refactor the urls so the main url is the home page
Browse files Browse the repository at this point in the history
  • Loading branch information
carlotacb committed Dec 30, 2023
1 parent e0e2004 commit 27df532
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default function EventPage() {
deleteEvent(id)
.then(() => {
setShowAlert(false);
router.replace("/home");
router.replace("/");
})
.catch((error) => {
console.log(error);
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default function Home() {
Come back in a few days... maybe we have news!
</SubTitle>
<Image
source={require("../../../assets/noInformation.jpg")}
source={require("../../../assets/empty.png")}
style={{ width: 280, height: 280, alignSelf: "center" }}
/>
</NoEventsContainer>
Expand All @@ -85,7 +85,7 @@ export default function Home() {
{events.map((event) => (
<Pressable
onPress={() => {
router.push(`/home/${event.id}`);
router.push(`/${event.id}`);
}}
key={event.id}
>
Expand Down
2 changes: 1 addition & 1 deletion organizator/app/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function HomepageTabs() {
return (
<Tabs>
<Tabs.Screen
name="home"
name="(home)"
options={{
tabBarLabel: "Home",
headerTitle: "All upcoming events",
Expand Down
54 changes: 0 additions & 54 deletions organizator/app/index.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions organizator/app/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default function LoginPage() {
useEffect(() => {
getToken().then((token) => {
if (token) {
router.replace("/home");
router.replace("/");
}
});
});
Expand Down Expand Up @@ -118,7 +118,7 @@ export default function LoginPage() {
});
} else {
storeToken(response.token);
router.replace("/home");
router.replace("/");
}
});
};
Expand Down
4 changes: 2 additions & 2 deletions organizator/app/register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function RegisterPage() {
useEffect(() => {
getToken().then((token) => {
if (token) {
router.replace("/home");
router.replace("/");
}
});
});
Expand Down Expand Up @@ -151,7 +151,7 @@ export default function RegisterPage() {
visibilityTime: 8000,
});
} else {
router.replace("/home");
router.replace("/(home)login");
}
});
};
Expand Down
Binary file added organizator/assets/empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed organizator/assets/noInformation.jpg
Binary file not shown.

0 comments on commit 27df532

Please sign in to comment.