Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Submission for Web Engineer test (2 test still failed) #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## Questionnaire

- Where did you find the job? -> LinkedIn / Indeed / Kyujin Box / Referral
- Have you applied on the site above? -> Yes / No
- Where did you find the job? -> LinkedIn
- Have you applied on the site above? -> Yes

## Agreement

- [ ] I did not ask anyone for help to solve the problem.
- [ ] I did not refer any other forks or pull requests of this repository.
- [ ] I would make my fork private if requested after screening.
- [x] I did not ask anyone for help to solve the problem.
- [x] I did not refer any other forks or pull requests of this repository.
- [x] I would make my fork private if requested after screening.
6 changes: 6 additions & 0 deletions fresh.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
// This file is automatically updated during development when running `dev.ts`.

import * as $0 from "./routes/index.tsx";
import * as $1 from "./routes/jobs/[randomString].tsx";
import * as $2 from "./routes/jobs/engineer.tsx";
import * as $3 from "./routes/jobs/index.tsx";

const manifest = {
routes: {
"./routes/index.tsx": $0,
"./routes/jobs/[randomString].tsx": $1,
"./routes/jobs/engineer.tsx": $2,
"./routes/jobs/index.tsx": $3,
},
islands: {},
baseUrl: import.meta.url,
Expand Down
11 changes: 10 additions & 1 deletion routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
/** @jsx h */
import { useState } from 'preact/hooks';
import { h } from "preact";

export default function Home() {
const [inputText, setInputText] = useState("engineer")

return (
<div>
<a href="https://www.active-connector.com/">
Expand All @@ -13,6 +16,12 @@ export default function Home() {
<h2>
Skill Test (Software Engineer)
</h2>
<input type="text" value={inputText} onInput={text => setInputText(text.currentTarget.value)} />
<a href={`/jobs/${inputText}`}>
<button>
Apply
</button>
</a>
</div>
);
}
}
20 changes: 20 additions & 0 deletions routes/jobs/[randomString].tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/** @jsx h */
import { h } from "preact";
import { PageProps } from '$fresh/server.ts';

export default function RandomString(props: PageProps) {
const { randomString } = props.params;

return (
<div>
<p>
{ randomString === "engineer"
? 'Job "engineer" is open for you!'
: randomString === ''
? 'error: empty input'
: `Job "${randomString}" is not available`
}
</p>
</div>
);
}
11 changes: 11 additions & 0 deletions routes/jobs/engineer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/** @jsx h */
import { h } from "preact";

export default function Engineer() {

return (
<div>
Job "engineer" is open for you!
</div>
);
}
12 changes: 12 additions & 0 deletions routes/jobs/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/** @jsx h */
import { h } from "preact";

export default function Job() {
return (
<div>
<p>
error: empty input
</p>
</div>
);
}