Skip to content

Commit

Permalink
Merge pull request #91 from brandonnorsworthy/updates
Browse files Browse the repository at this point in the history
make site more legit
  • Loading branch information
brandonnorsworthy authored Sep 23, 2024
2 parents d6fbcd9 + e515564 commit b156da9
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 14 deletions.
5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<meta property="og:title" content="Rust Quests">
<meta name="description" content="Randomly generate things to do for the game Rust! If you find yourself sitting around your base this is the place for you!" />
<meta name="description" content="Randomly generate missions/quests for things to do for the game Rust! If you find yourself sitting around your base this is the place for you!" />
<meta property="og:title" content="Rust Quests">
<meta property="og:type" content="article">
<meta property="og:url" content="https://rustquests.com">
<meta property="og:image" content="https://placehold.co/1200x630">
Expand All @@ -16,7 +17,7 @@
<meta property="og:image:height" content="630">
<meta name="twitter:site" content="Rust Quests">
<meta name="twitter:title" content="Random Quest Generator">
<meta name="twitter:description" content="Randomly generate things to do for the game Rust! If you find yourself sitting around your base this is the place for you!">
<meta name="twitter:description" content="Randomly generate missions/quests for things to do for the game Rust! If you find yourself sitting around your base this is the place for you!">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image:src" content="https://placehold.co/1200x630">
<title>Rust Quests</title>
Expand Down
1 change: 1 addition & 0 deletions public/assets/text/news.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

## Future Updates
- Light/Dark mode toggle
- Select the tier/stage you are in for the wipe to get challenges relevant to your progression. (e.g. early game, mid game, late game)
- Bingo card generator with a code to share with friends to compete or collaborate
__^^ let us know if this is a feature you'd like to see! ^^__

Expand Down
4 changes: 4 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
User-agent: *
Disallow:

Sitemap: https://rustquests.com/sitemap.xml
17 changes: 17 additions & 0 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<!-- Public Routes -->
<url>
<loc>https://rustquests.com/</loc>
</url>
<url>
<loc>https://rustquests.com/login</loc>
</url>
<url>
<loc>https://rustquests.com/unauthorized</loc>
</url>
<url>
<loc>https://rustquests.com/leaderboard</loc>
</url>

</urlset>
36 changes: 24 additions & 12 deletions src/pages/admin/AdminSuggestionsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,6 @@ const AdminSuggestionsPage = () => {
closeModal();
};

const handleDeleteSuggestion = async () => {
const onConfirm = () => toast.info('not implemented yet');
setConfirmDialog({
title: "Are you sure?",
description: "If you delete this suggestion, you will lose all changes.",
onConfirm: () => {
onConfirm();
setConfirmDialog(null);
}
});
};

const handleCreateQuest = async (newQuest: convertSuggestionIntoQuestBodyRequest) => {
const handleConvertSuggestionToQuest = async () => {
try {
Expand Down Expand Up @@ -125,6 +113,30 @@ const AdminSuggestionsPage = () => {
}
});
};

const handleDeleteSuggestion = async () => {
const onConfirm = () => {
try {
if (!selectedSuggestion) return;
if (!accessToken) return;

suggestionService.deleteSuggestion(accessToken, selectedSuggestion.id);
closeModal();
fetchSuggestions();

toast.success("Suggestion deleted successfully");
} catch (error) {
toast.error("Failed to delete suggestion", error);
} finally {
setConfirmDialog(null);
}
};
setConfirmDialog({
title: "Are you sure?",
description: "If you delete this suggestion, you will lose all changes.",
onConfirm: onConfirm,
});
};

return (
<main className="overflow-hidden h-dvh w-dvw">
Expand Down

0 comments on commit b156da9

Please sign in to comment.