File tree Expand file tree Collapse file tree 4 files changed +49
-12
lines changed
Expand file tree Collapse file tree 4 files changed +49
-12
lines changed Original file line number Diff line number Diff line change 4141 </a >
4242 {/if }
4343
44+ <a class ="btn btn-sm variant-ghost-surface" href ={route (' about' )} use:inertia > About </a >
45+ <a class ="btn btn-sm variant-ghost-surface" href ={route (' contact' )} use:inertia > Contact </a >
46+
4447 <a
45- class =" btn btn-sm variant-ghost -surface"
48+ class =" btn btn-sm variant-ringed -surface"
4649 href =" https://twitter.com/acelords"
4750 target =" _blank"
4851 rel =" noreferrer"
4952 >
5053 Twitter
5154 </a >
5255 <a
53- class =" btn btn-sm variant-ghost -surface"
56+ class =" btn btn-sm variant-ringed -surface"
5457 href =" https://github.com/lexxyungcarter/laravelte"
5558 target =" _blank"
5659 rel =" noreferrer"
Original file line number Diff line number Diff line change 11<script lang =" ts" >
2- import {inertia } from ' @inertiajs/svelte'
3- </script >
2+ import Title from ' @/Components/Title.svelte'
3+ import { inertia } from ' @inertiajs/svelte'
4+ import { fly } from ' svelte/transition'
5+ import { quintOut } from ' svelte/easing'
6+ import { onMount } from ' svelte'
47
5- <h2 >About us</h2 >
8+ let ready = false
9+ onMount (() => (ready = true ))
10+ </script >
611
7- <a href =" /" use:inertia >GoHome</a >
8- <a href ={route (' contact' )} use:inertia >Contact</a >
12+ <div class ="container mt-5" in:fly ={{ y : - 70 , duration : 300 , easing : quintOut }}>
13+ <Title >About Us Page</Title >
14+ <a href =" /" use:inertia >Go Home</a >
15+ <br />
16+ <a href ={route (' contact' )} use:inertia >Contact</a >
17+ </div >
Original file line number Diff line number Diff line change 11<script lang =" ts" >
2- import {inertia } from ' @inertiajs/svelte'
3- </script >
2+ import Title from ' @/Components/Title.svelte'
3+ import { inertia } from ' @inertiajs/svelte'
4+ import { fly } from ' svelte/transition'
5+ import { quintOut } from ' svelte/easing'
6+ import { onMount } from ' svelte'
47
5- <h2 >Contact us</h2 >
8+ let ready = false
9+ onMount (() => (ready = true ))
10+ </script >
611
7- <a href =" /" use:inertia >Go Home</a >
8- <a href ={route (' about' )} use:inertia >About</a >
12+ <div class ="container mt-5" in:fly ={{ y : - 70 , duration : 300 , easing : quintOut }}>
13+ <Title >Contact Us Page</Title >
14+ <a href =" /" use:inertia >Go Home</a >
15+ <br />
16+ <a href ={route (' about' )} use:inertia >About</a >
17+ </div >
Original file line number Diff line number Diff line change 1616 ->component ('Home ' )
1717 );
1818})->group ('browser ' );
19+
20+ test ('about screen can be rendered ' , function () {
21+ $ response = $ this ->get (route ('about ' ));
22+
23+ $ response ->assertInertia (fn (Assert $ page ) => $ page
24+ ->component ('About ' )
25+ );
26+ })->group ('browser ' );
27+
28+ test ('contact screen can be rendered ' , function () {
29+ $ response = $ this ->get (route ('contact ' ));
30+
31+ $ response ->assertInertia (fn (Assert $ page ) => $ page
32+ ->component ('Contact ' )
33+ );
34+ })->group ('browser ' );
You can’t perform that action at this time.
0 commit comments