Showing
2 changed files
with
21 additions
and
0 deletions
1 | import Search from './routes/Search.svelte'; | 1 | import Search from './routes/Search.svelte'; |
2 | +import Character from './routes/Character.svelte'; | ||
2 | 3 | ||
3 | const routes = { | 4 | const routes = { |
4 | '/': Search, | 5 | '/': Search, |
6 | + '/character': Character, | ||
7 | + '/character/:character': Character, | ||
5 | }; | 8 | }; |
6 | 9 | ||
7 | export default routes; | 10 | export default routes; |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
app/web/src/routes/Character.svelte
0 → 100644
1 | +<script> | ||
2 | + export let params = {}; | ||
3 | + | ||
4 | + import {push} from 'svelte-spa-router'; | ||
5 | + | ||
6 | + function init() { | ||
7 | + if(!params.character) { | ||
8 | + M.toast({html:"캐릭터명을 입력해주세요."}); | ||
9 | + push("/"); | ||
10 | + } | ||
11 | + } | ||
12 | + | ||
13 | + init(); | ||
14 | +</script> | ||
15 | + | ||
16 | +<svelte:head> | ||
17 | + | ||
18 | +</svelte:head> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment