refactor: clean code
This commit is contained in:
parent
527d9236df
commit
4f7311d02b
1 changed files with 2 additions and 3 deletions
|
@ -6,14 +6,13 @@ import { getParams, isURL } from "../utils";
|
||||||
import Post from "../components/post.astro";
|
import Post from "../components/post.astro";
|
||||||
|
|
||||||
const params = getParams(Astro.url);
|
const params = getParams(Astro.url);
|
||||||
const url: string = params?.url;
|
const url: string = params?.url || "";
|
||||||
const article = isURL(url) && (await extract(url));
|
const article = isURL(url) && (await extract(url));
|
||||||
|
|
||||||
const form = new FormGroup([
|
const form = new FormGroup([
|
||||||
{
|
{
|
||||||
type: "text",
|
|
||||||
name: "url",
|
name: "url",
|
||||||
value: url || "",
|
value: url,
|
||||||
placeholder: "Put the URL here",
|
placeholder: "Put the URL here",
|
||||||
validators: [Validators.required, Validators.minLength(11)],
|
validators: [Validators.required, Validators.minLength(11)],
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue