Skip to content

Commit

Permalink
frontend: fix env load
Browse files Browse the repository at this point in the history
  • Loading branch information
hynseok committed Nov 3, 2024
1 parent 834da9a commit f87b854
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 16 deletions.
6 changes: 0 additions & 6 deletions frontend/src/build.rs

This file was deleted.

4 changes: 1 addition & 3 deletions frontend/src/components/form.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ use yew::format::{Json, Nothing};
use yew::prelude::*;
use yew::services::fetch::{FetchService, FetchTask, Request, Response};

use crate::get_api_url;

#[derive(Serialize)]
struct FormData {
name: String,
Expand Down Expand Up @@ -67,7 +65,7 @@ impl Component for Form {
content: self.content.clone(),
};

let request = Request::post(get_api_url())
let request = Request::post("https://ask.scg.skku.ac.kr/v1/send")
.header("Content-Type", "application/json; charset=utf-8")
.body(Json(&form_data))
.expect("Could not build request.");
Expand Down
3 changes: 0 additions & 3 deletions frontend/src/env.rs

This file was deleted.

3 changes: 0 additions & 3 deletions frontend/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
// src/lib.rs
mod app;
mod components;
mod env;
mod pages;
mod route;
mod build;

use env::*;
use wasm_bindgen::prelude::*;
use yew::prelude::*;

Expand Down
9 changes: 8 additions & 1 deletion frontend/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@
</script>
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" type="text/css" href="/styles.css" />
<link rel="preload" as="image" href="images/herobg.webp" imagesizes="100vw">
<link rel="preload" as="image" href="/images/logo.png" />
<link rel="preload" as="image" href="/images/herobg.webp" imagesizes="100vw" />
<link rel="preload" as="script" href="/wasm.js" />
<link rel="preload" as="stylesheet" href="/styles.css" />
<link rel="preload" as="wasm" href="/wasm_bg.wasm"/>
<link rel="preload" as="font" href="/fonts/Pretendard/Pretendard-Regular.woff2" />
<link rel="preload" as="font" href="/fonts/Pretendard/Pretendard-Bold.woff2" />
<link rel="preload" as="font" href="/fonts/Montserrat/Montserrat900.woff2" />
</head>
<body>
</body>
Expand Down

0 comments on commit f87b854

Please sign in to comment.