Skip to content

Commit

Permalink
linking page (#566)
Browse files Browse the repository at this point in the history
* linking page

* remove downloads page
  • Loading branch information
codekansas authored Nov 9, 2024
1 parent 3351b0e commit 956ea5a
Show file tree
Hide file tree
Showing 39 changed files with 241 additions and 1,699 deletions.
27 changes: 12 additions & 15 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Route, BrowserRouter as Router, Routes } from "react-router-dom";

import "@/App.css";

import Container from "@/components/Container";
import NotFoundRedirect from "@/components/NotFoundRedirect";
import PendoInitializer from "@/components/PendoInitializer";
import { ScrollToTop } from "@/components/ScrollToTop";
Expand All @@ -17,10 +16,10 @@ import Account from "@/components/pages/Account";
import Browse from "@/components/pages/Browse";
import Create from "@/components/pages/Create";
import DeleteConnect from "@/components/pages/DeleteConnect";
import DownloadsPage from "@/components/pages/Download";
import EmailSignup from "@/components/pages/EmailSignup";
import FileBrowser from "@/components/pages/FileBrowser";
import Home from "@/components/pages/Home";
import LinkRobot from "@/components/pages/LinkRobot";
import Listing from "@/components/pages/Listing";
import Login from "@/components/pages/Login";
import Logout from "@/components/pages/Logout";
Expand Down Expand Up @@ -54,7 +53,7 @@ const App = () => {
<PendoInitializer />
<SprigInitializer />
<div className="flex-grow">
<Container>
<div className="mt-20 mb-6 mx-4 sm:mx-6 md:mx-10 xl:mx-16 2xl:mx-28 max-full">
<Routes>
<Route path={ROUTES.HOME.path} element={<Home />} />

Expand All @@ -66,10 +65,6 @@ const App = () => {

{/* General pages */}
<Route path={ROUTES.ABOUT.path} element={<About />} />
<Route
path={ROUTES.DOWNLOADS.path}
element={<DownloadsPage />}
/>
<Route
path={ROUTES.RESEARCH.path}
element={<ResearchPage />}
Expand Down Expand Up @@ -102,20 +97,17 @@ const App = () => {
/>

{/* Listings */}
<Route path={ROUTES.LISTINGS.path}>
<Route path={ROUTES.BOTS.path}>
<Route
path={ROUTES.LISTINGS.$.BROWSE.relativePath}
path={ROUTES.BOTS.$.BROWSE.relativePath}
element={<Browse />}
/>
<Route
path={ROUTES.LISTINGS.$.CREATE.relativePath}
path={ROUTES.BOTS.$.CREATE.relativePath}
element={<Create />}
/>
</Route>
<Route
path={ROUTES.LISTING.path}
element={<Listing />}
/>
<Route path={ROUTES.BOT.path} element={<Listing />} />
<Route
path={ROUTES.FILE.path}
element={<FileBrowser />}
Expand Down Expand Up @@ -158,14 +150,19 @@ const App = () => {
element={<Terminal />}
/>

<Route
path={ROUTES.LINK.path}
element={<LinkRobot />}
/>

{/* Not found */}
<Route
path={ROUTES.NOT_FOUND.path}
element={<NotFound />}
/>
<Route path="*" element={<NotFoundRedirect />} />
</Routes>
</Container>
</div>
</div>
<Footer />
</div>
Expand Down
17 changes: 0 additions & 17 deletions frontend/src/components/Container.tsx

This file was deleted.

176 changes: 0 additions & 176 deletions frontend/src/components/DownloadKernelImage.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion frontend/src/components/listing/ListingDeleteButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const ListingDeleteButton = (props: Props) => {
setDeleting(false);
} else {
addAlert("Listing was deleted successfully", "success");
navigate(ROUTES.LISTINGS.BROWSE.path);
navigate(ROUTES.BOTS.BROWSE.path);
}
};

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/listings/ListingGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ const ListingGrid = (props: ListingGridProps) => {
<Spinner />
</div>
) : (
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 max-w-7xl mx-auto">
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4">
{listingInfos.map((info) => (
<Link
to={ROUTES.LISTING.buildPath({
to={ROUTES.BOT.buildPath({
username: info.username,
slug: info.slug || info.id,
})}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/listings/MyListingGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const MyListingGrid = ({ userId }: MyListingGridProps) => {
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 sm:gap-6">
{listingInfos.map((info) => (
<Link
to={ROUTES.LISTING.buildPath({
to={ROUTES.BOT.buildPath({
username: info.username,
slug: info.slug || info.id,
})}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/listings/UpvotedGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const UpvotedGrid = ({ page, setPage }: UpvotedGridProps) => {
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 sm:gap-6">
{listingInfos.map((info) => (
<Link
to={ROUTES.LISTING.buildPath({
to={ROUTES.BOT.buildPath({
username: info.username || "unknown",
slug: info.slug || info.id,
})}
Expand Down
53 changes: 0 additions & 53 deletions frontend/src/components/modals/DeleteKernelImageModal.tsx

This file was deleted.

Loading

0 comments on commit 956ea5a

Please sign in to comment.