Skip to content

Commit

Permalink
chore: Remove unnecessary basepath
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Oct 11, 2023
1 parent 5f8c8de commit ae8f69f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
2 changes: 0 additions & 2 deletions Dioxus.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ asset_dir = "public"
# HTML title tag content
title = "Dioxus Community 🧬"

base_path = "website"

[web.watcher]

# when watcher trigger, regenerate the `index.html`
Expand Down
10 changes: 0 additions & 10 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ mod routes;

pub use routes::*;

#[cfg(not(debug_assertions))]
pub const BASE_PATH: &str = "/website";

#[cfg(debug_assertions)]
pub const BASE_PATH: &str = "";

fn main() {
// Init debug
dioxus_logger::init(LevelFilter::Info).expect("failed to init logger");
Expand All @@ -33,10 +27,6 @@ fn app(cx: Scope) -> Element {

#[derive(Clone, Routable, Debug, PartialEq)]
pub enum Route {
#[cfg(not(debug_assertions))]
#[route("/website")]
Home {},
#[cfg(debug_assertions)]
#[route("/")]
Home {},
// #[route("/made-with-dioxus")]
Expand Down
4 changes: 2 additions & 2 deletions src/routes/home.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{navbar::*, BASE_PATH};
use crate::navbar::*;
use dioxus::prelude::*;

#[inline_props]
Expand All @@ -11,7 +11,7 @@ pub fn Home(cx: Scope) -> Element {
img {
class: "mx-auto my-8",
width: "200",
src: "{BASE_PATH}/logo.svg"
src: "logo.svg"
},
p {
class: "text-white w-2/3 text-center mx-auto",
Expand Down

0 comments on commit ae8f69f

Please sign in to comment.